# Require username for oauth users

**URL:** <https://community.auth0.com/t/require-username-for-oauth-users/6777>\
**Category:** Get Help\
**Tags:** oauth, database\
**Created:** [May 28, 2017, 10:14am UTC](https://community.auth0.com/t/require-username-for-oauth-users/6777 "2017-05-28T10:14:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bopmobdev](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@bopmobdev](https://community.auth0.com/u/bopmobdev)\
**Post date:** [May 28, 2017, 10:14am UTC](https://community.auth0.com/t/require-username-for-oauth-users/6777/1 "2017-05-28T10:14:31Z")

</div>

Is there a way of entering in a username for users who’ve authenticated through an oauth connection? My use case is that I’d like to have a username I can use across my app. I’ve setup my database to require usernames. I tried to update an oauth user with a username through the management API, but I receive the error:  
“Cannot update username for non-database user”

Is there a way to associate a username to any oauth users?

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [May 29, 2017, 9:35am UTC](https://community.auth0.com/t/require-username-for-oauth-users/6777/2 "2017-05-29T09:35:29Z")

</div>

The `username` property in the user profile is reserved for database connections with `Requires username` enabled. It cannot be modified/set for users using a non-database connection.

If your requirement is purely to display a username on the UI, you can store a `username` in `user_metadata`, which you can then use in your frontend.

> **[Understand How Metadata Works in User Profiles](https://auth0.com/docs/manage-users/user-accounts/metadata)**
>
> Describes Auth0 user, application, and client metadata. Learn how you can use metadata to store information that does not originate from an identity provider.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:54am UTC](https://community.auth0.com/t/require-username-for-oauth-users/6777/3 "2018-03-02T05:54:10Z")

</div>


