Docs Home → Atlas App Services
Read User Metadata
On this page
Overview
Atlas App Services represents each application user internally with a User Object that includes a unique ID and additional metadata that describes the user. You can access user objects:
With the App Services UI, CLI, or Admin API to find and filter users.
In the App Services UI by viewing user data.
In a Function by accessing the context.user interface.
In a rule expression with the
%%user
expansion.In Android, iOS, Node, React Native, and .NET client applications using a Realm SDK.
Schema
User objects have the following form:
{ "id": "<Unique User ID>", "type": "<User Type>", "data": { "<Metadata Field>": <Value>, ... }, "custom_data": { "<Custom Data Field>": <Value>, ... }, "identities": [ { "id": <Unique Identity ID>, "provider_type": "<Authentication Provider>", "data": { "<Metadata Field>": <Value>, ... } } ] }
Field | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | string | A string representation of the ObjectId that uniquely identifies the
user. | ||||||||||||||||
type | string | The type of the user. The following types are possible:
| ||||||||||||||||
data | document | A document that contains metadata that describes the
user. This field combines the data for all NoteSystem Functions Have No User DataIn system functions, the | ||||||||||||||||
custom_data | document | A document from your application's custom user
data collection that
specifies the user's ID. You can use the custom user data
collection to store arbitrary data about your application's
users. If you set the NoteAvoid Storing Large Custom User DataCustom user data is limited to | ||||||||||||||||
identities | array | A list of authentication provider identities associated with the user. When a user first logs in with a specific provider, App Services associates the user with an identity object that contains a unique identifier and additional metadata about the user from the provider. For subsequent logins, App Services refreshes the existing identity data but does not create a new identity. Identity objects have the following form:
|
Note
In general, App Services creates a user object for a given user the first time that they authenticate. If you create a test Email/Password user through the App Services UI, App Services creates that user's user object immediately.
Find Users
Filter Users
You can specify filters that limit a list of users to a subset of users that satisfy the filter conditions.
View User Data
View a User's Devices
When a user connects to your application, Atlas App Services logs information similar to the following:

Logged information includes:
The device platform, which will be either an http client ("chrome", "firefox", "phantomjs", etc.) or a mobile OS ("ios", "android", etc.)
The platform version.
Your app version on the device.
A unique device ID.
To view this information, from the list of users, expand any user and then expand Devices.
View a User's Provider Data
Whenever a user connects to your application and authenticates using one of the authentication providers you have enabled, App Services logs the provider data.

You can view this collection of Provider Data from within the list of users by doing the following:
Find a user in the list of users.
Expand the user, and then expand the Provider Data.
View a User's Activity Log
App Services logs every request made by each of your App
users, including executed function calls. Also, if a function writes to
the log using console.log
, console.warn
, or console.error
,
these entries will be included within the function's log output.

To view a user's request logs, follow these steps:
Select App Users from the left navigation menu.
Under the Users tab, find a user in the list and click on the ellipsis (
...
).Click View activity. This will redirect you to a log of requests made by that specific user. You can expand an entry to view details for that request.
Summary
The user object contains relevant information about the user that you can use in your app logic.
The exact information contained in the user object depends on the authentication providers used.
You can search for users in the
Users
page of the App Services UI.App Services logs information such as user's connected devices, provider data, and activity log.