Get Oidc User Info Using GET

Get Oidc User Info Using GET

Display the content of the given access token if the token is valid. Also includes the group_ids and group_names if the client is registered with group_id, group_names scopes. If the token is invalid or expired, an error will be returned. If group_ids and group_names are both requested, they will be in the same order in both the claims. If the token was obtained using an API token, the groups information will be available only if the openid scope was selected.

Access Policy

Role User Accounts Service Accounts (Client Credentials Applications)
Anonymous ✔️ ✔️
Request
URI
GET
https://{api_host}/csp/gateway/am/api/userinfo
COPY
Header Parameters
string
authorization
Required

Access token in 'Bearer' authentication format i.e. 'Bearer XXX' where XXX is the content of an access token.


Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns OidcUserInfoDto of type(s) application/json
{
    "family_name": "string",
    "context": "string",
    "email": "string",
    "sub": "string",
    "email_verified": false,
    "group_names": [
        "string"
    ],
    "username": "string",
    "group_ids": [
        "string"
    ],
    "acct": "string",
    "context_name": "string",
    "given_name": "string",
    "domain": "string"
}
string
family_name
Optional

The family name of the user.

string
context
Optional

The context identifier in which the token was issued.

string
email
Optional

The email address of the user.

string
sub
Optional

The user on behalf of which the token was issued.

boolean
email_verified
Optional

True if the user's e-mail address has been verified.

array of string
group_names
Optional

Group names the user belongs to. Property will be returned only if the client registered with 'group_names' scope.

string
username
Optional

The username of the user.

array of string
group_ids
Optional

Group ids the user belongs to. Property will be returned only if the client registered with 'group_ids' scope.

string
acct
Optional

The identifier of the user, configured to log in to the Identity provider. The acct claim can be a combination of the user's username and domain in URLEncoded(username)@domain format or the user's email or the UPN of the user.

string
context_name
Optional

The context name (equals to CSP organization ID) in which the token was issued.

string
given_name
Optional

The 'given' name of the user.

string
domain
Optional

The identity provider (IdP) domain of the user.


400

Authorization header must be specified | Invalid authorization header. Missing "Bearer" prefix | Invalid bearer token. Missing valid token.

Returns CspErrorResponse of type(s) application/json
"CspErrorResponse Object"
string
cspErrorCode
Optional

cspErrorCode

string
message
Optional

message

string
errorCode
Optional

errorCode

string
requestId
Optional

requestId

integer As int32 As int32
moduleCode
Optional

moduleCode

integer As int32 As int32
statusCode
Optional

statusCode


404

The requested resource could not be found

Returns CspErrorResponse of type(s) application/json
"CspErrorResponse Object"
string
cspErrorCode
Optional

cspErrorCode

string
message
Optional

message

string
errorCode
Optional

errorCode

string
requestId
Optional

requestId

integer As int32 As int32
moduleCode
Optional

moduleCode

integer As int32 As int32
statusCode
Optional

statusCode


429

The user has sent too many requests

Returns CspErrorResponse of type(s) application/json
"CspErrorResponse Object"
string
cspErrorCode
Optional

cspErrorCode

string
message
Optional

message

string
errorCode
Optional

errorCode

string
requestId
Optional

requestId

integer As int32 As int32
moduleCode
Optional

moduleCode

integer As int32 As int32
statusCode
Optional

statusCode


500

An unexpected error has occurred while processing the request

Returns CspErrorResponse of type(s) application/json
"CspErrorResponse Object"
string
cspErrorCode
Optional

cspErrorCode

string
message
Optional

message

string
errorCode
Optional

errorCode

string
requestId
Optional

requestId

integer As int32 As int32
moduleCode
Optional

moduleCode

integer As int32 As int32
statusCode
Optional

statusCode


Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/csp/gateway/am/api/userinfo