Get Loggedin User Using GET
Get principal user information.
Principal user is identified via a token. The token should be passed in a header called csp-auth-token.If expandProfile is passed in the request user profile information will be also returned.
Access Policy
Role | User Accounts | Service Accounts (Client Credentials Applications) |
---|---|---|
All Roles | ✔️ | ❌ |
Indicates if response should be expanded, value is ignored - only the existence of parameter is checked. Includes the address details of the user only if the user is non-federated(vmwareid). If the user is federated, this flag is ignored.
Indicates if the response should be expanded with the user profile; the value is ignored, only the existence of parameter is checked. Includes the profile details of the user in the userProfile attribute. This userProfile attribute consists of the same output as calling "/am/api/loggedin/user/profile".
OK
{
"eulaInfo": "string",
"tnc": false,
"customerNumber": "string",
"userProfile": {
"isFederated": false,
"linkedUserIdAccount": "string",
"alternativeEmail": "string",
"language": "string",
"locale": "string",
"defaultOrgId": "string",
"customerNumber": "string"
},
"userId": "string",
"refLink": "string",
"country": "string",
"state": "string",
"email": "string",
"city": "string",
"firstName": "string",
"acct": "string",
"lastName": "string",
"address": "string",
"password": "string",
"stateName": "string",
"stateCode": "string",
"username": "string",
"countryName": "string",
"countryCode": "string",
"zipcode": "string",
"tradeId": "string",
"company": "string",
"workPhone": "string",
"website": "string",
"emailVerified": false
}
The end-user license agreement information.
Terms and conditions.
The customer number.
Define user profile with default organization, locale and language.
The unique identifier of the user, on behalf of which the token was issued.
The reference link to the user profile.
The country.
The user's state.
The email address of the user.
The city.
The first name of the user.
The identifier of the user, configured to log in to the Identity provider.
The last name of the user.
The address.
The password. Combination of characters, numbers and special symbols that is hard to guess.
The user's state name.
The user's state code.
The username of the user.
The country name.
The country code.
The ZIP code.
The trade ID.
The company.
The work phone number.
The web site.
True if the user's e-mail address has been verified.
The user is not authorized to use the API
"CspErrorResponse Object"
cspErrorCode
message
errorCode
requestId
moduleCode
statusCode
The user is forbidden to use the API
"CspErrorResponse Object"
cspErrorCode
message
errorCode
requestId
moduleCode
statusCode
No user with given token exists
"CspErrorResponse Object"
cspErrorCode
message
errorCode
requestId
moduleCode
statusCode
The user has sent too many requests
"CspErrorResponse Object"
cspErrorCode
message
errorCode
requestId
moduleCode
statusCode
An unexpected error has occurred while processing the request
"CspErrorResponse Object"
cspErrorCode
message
errorCode
requestId
moduleCode
statusCode
curl -H 'Authorization: <value>' https://{api_host}/csp/gateway/am/api/loggedin/user