/
REST Other OAuth2 User Info API

REST Other OAuth2 User Info API

?.?.?

The OAuth2 User Info REST API can be used to obtain information about the authenticated user from the OAuth2 provider.

In order to use the OAuth2 User Info API, the API must be called when using JWT authentication.

Please see the REST Integration Authentication page for more details.  

Resource URL Summary

Retrieve details about the authenticated user from the OAuth2 provider

GET /up/v5/oauth2/userInfo

HTTP Headers

This API uses the standard ServiceBroker Content-Type HTTP Header, but does not use the standard Authorization header.


API Specifics

Retrieve details about the authenticated user from the OAuth2 provider

This REST API will return details about the authenticated user from the OAuth2 provider.

In order to use the OAuth2 User Info API, the API must be called when using JWT authentication.

Please see the REST Integration Authentication page for more details.

URL

GET /up/v5/oauth2/userInfo

HTTP Request Body

This request does not require a request body. 

HTTP Response

Success

On success, an HTTP response code of 200 will be returned, and the response body will be a JSON object of the following format:

{
  "email": "first.last@domain.com",
  "email_verified": "false",
  "family_name": "Last Name",
  "given_name": "First Name",
  "preferred_username": "Authentication ID",
  "sid": "Tenant Identifier",
  "sub": "Identifier for the user",
  "username": "UserID for the user"
}
PropertyTypeDescription
emailstringThe email address of the authenticated user from the OAuth2 provider.
email_verifiedboolean

Specifies if the user's email address has been verified in the OAuth2 provider.

Valid values are:

  • true - User's email address has been verified
  • false - User's email verification is pending. This is the default value if this property is not specified.
family_namestringThe last name of the authenticated user from the OAuth2 provider.
given_namestringThe first name of the authenticated user from the OAuth2 provider
preferred_usernamestringThe Authentication ID of the authenticated user from the OAuth2 provider
sidstringThe publicly exposed Tenant ID of the authenticated user from the OAuth2 provider
substringThe identifier of the authenticated user from the OAuth2 provider.
usernamestringThe User ID of the authenticated user from the OAuth2 provider.

Of these, only email_verified, sid and sub are guaranteed to be available - other properties may not be available, depending on the OAuth2 provider.

Error

Otherwise, on error, the API will:

  • Return an HTTP response code of 400, if the request was invalid;
  • Return an HTTP response code of 401, if the request was not authorized; or
  • Return an HTTP response code of 500, if something else went wrong.

Both HTTP 400 and 500 responses will contain a REST Integration Standard Response Object with appropriate values for the Code and/or Message fields, describing the error, in the response body.

Related content

REST Other OAuth2 Token API
REST Other OAuth2 Token API
More like this
REST Objects OAuth2 Token Request
REST Objects OAuth2 Token Request
More like this