Get a User

GET /groups/{groupId}/apps/{appId}/users/{userId}

Get a specific user account by ID.

Path parameters

Responses

  • 200 application/json

    Success

    Hide response attributes Show response attributes object
    • _id string

      The unique user account ID

    • identities array[object]

      A list of authentication provider identities associated with the user account.

      An authenticated identity from an authentication provider. This represents the user account within an individual auth provider and maps the account to external authentication systems.

      Hide identities attributes Show identities attributes object
      • id string
      • provider_type string

        Values are anon-user, local-userpass, api-key, oauth2-apple, oauth2-google, oauth2-facebook, custom-token, or custom-function.

      • provider_id string
    • type string

      The user type. Most users are normal and represent a specific human user. Users created through the api-key provider have the type server because they are typically used for programmatic access from a server.

      Values are normal or server.

    • creation_date integer

      The date and time that the user account was created. Represented by the number of seconds since the UNIX epoch.

    • last_authentication_date integer

      The date and time that the user account last logged in or authenticated a request. Represented by the number of seconds since the UNIX epoch.

    • disabled boolean

      If true, the user account is inactive and cannot login or interact with App Services.

    • data object

      Metadata that describes the user. This field combines the data for all authentication identities associated with the user. The exact field names and values depend on which authentication providers the user has authenticated with.

      For example, if a user has linked an email/password account with their Google account, this object might contain their email as well as metadata fields from Google like name and picture.

GET /groups/{groupId}/apps/{appId}/users/{userId}
curl \
 --request GET 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/users/{userId}' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "_id": "string",
  "identities": [
    {
      "id": "string",
      "provider_type": "anon-user",
      "provider_id": "string"
    }
  ],
  "type": "normal",
  "creation_date": 42,
  "last_authentication_date": 42,
  "disabled": true,
  "data": {}
}