Skip to content

Obtain User Information

To obtain basic profile information about the user who generates the access token, it is mandatory to pass the openid scope, when generating the access token.

The following two options are available to obtain the actual user information.

Decoding the id_token

By decoding the id_token, a payload with user information such as email (similar to the one shown below) can be obtained.

    "sub":"[email protected]",
    "email":"[email protected]"

Invoke the userinfo endpoint

An access token can be used to invoke the userinfo endpoint to obtain user information as a payload. These claims in the payload are normally represented by a JSON object that contains a collection of name and value pairs for the claims. The format of the curl command is given below.


curl -k -v -H "Authorization: Bearer <ACCESS_TOKEN>" https://<IS_HOST>:<IS_PORT>/oauth2/userinfo


HTTP/1.1 200 OK
  Content-Type: application/json

   "sub": "248289761001",
   "name": "Jane Doe",
   "given_name": "Jane",
   "family_name": "Doe",
   "preferred_username": "j.doe",
   "email": "[email protected]",