Docs Menu
Docs Home
/ /
Atlas Device SDKs
/ /

User Metadata - .NET SDK

On this page

  • Read a User's Metadata
  • Configure User Metadata
  • Update User Metadata

You can read the user metadata of a currently logged-in user through the User object. You cannot edit user metadata through a User object.

The Profile property on the User object returns a UserProfile object of a logged-in user. The following example shows how to get a user's email from the metadata:

var user = await app.LogInAsync(
Credentials.EmailPassword("user1@example.com", "p@ssw0rd"));
Console.WriteLine($"The user's email is {user.Profile.Email}");

User metadata options vary depending on which provider you're using and which metadata fields you enable.

Warning

User Metadata May Be Stale

Atlas App Services fetches the most recent version of user metadata when a user logs in. If the user changes their email address or profile photo with a login provider, for example, those changes do not update in user metadata until the user logs in again. Because we cache credentials and enable you to bypass the login flow, user metadata may become stale unless you force the user to log in again.

You can only read user metadata from the client app that you have configured on the App Services application.

You can configure the user metadata you request from an authentication provider. You do this directly on the authentication provider's configuration. For more details on which metadata fields you can use, see the provider details:

You can change which metadata fields you have configured by editing the provider's configuration.

User metadata that you access through the authentication provider is read-only data. You cannot update or edit user metadata that comes from this source.

If you would like to give a user the option the update their metadata from within your client app, use custom user data, instead.

← Custom User Data