Get information about the currently logged in user

GET /auth/profile

Responses

  • 200 application/json

    The profile was successfully retrieved.

    Hide response attributes Show response attributes object
    • user_id string
    • domain_id string
    • identities array[object]

      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
    • data object
      Hide data attributes Show data attributes object
      • email string
      • name string
    • type string

      Values are normal, server, system, or unknown.

    • roles array[object]
      Hide roles attributes Show roles attributes object
      • role_name string
      • group_id string
GET /auth/profile
curl \
 --request GET 'https://services.cloud.mongodb.com/api/admin/v3.0/auth/profile' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "user_id": "string",
  "domain_id": "string",
  "identities": [
    {
      "id": "string",
      "provider_type": "anon-user",
      "provider_id": "string"
    }
  ],
  "data": {
    "email": "string",
    "name": "string"
  },
  "type": "normal",
  "roles": [
    {
      "role_name": "string",
      "group_id": "string"
    }
  ]
}