REST Other OAuth2 User Info API
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" }
Property | Type | Description |
---|---|---|
email | string | The email address of the authenticated user from the OAuth2 provider. |
email_verified | boolean | Specifies if the user's email address has been verified in the OAuth2 provider. Valid values are:
|
family_name | string | The last name of the authenticated user from the OAuth2 provider. |
given_name | string | The first name of the authenticated user from the OAuth2 provider |
preferred_username | string | The Authentication ID of the authenticated user from the OAuth2 provider |
sid | string | The publicly exposed Tenant ID of the authenticated user from the OAuth2 provider |
sub | string | The identifier of the authenticated user from the OAuth2 provider. |
username | string | The 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.