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
{
"acct": "string",
"address": "string",
"city": "string",
"company": "string",
"country": "string",
"countryCode": "string",
"countryName": "string",
"customerNumber": "string",
"email": "string",
"emailVerified": false,
"eulaInfo": "string",
"firstName": "string",
"lastName": "string",
"password": "string",
"refLink": "string",
"state": "string",
"stateCode": "string",
"stateName": "string",
"tnc": false,
"tradeId": "string",
"userId": "string",
"userProfile": {
"alternativeEmail": "string",
"customerNumber": "string",
"defaultOrgId": "string",
"isFederated": false,
"language": "string",
"linkedUserIdAccount": "string",
"locale": "string"
},
"username": "string",
"website": "string",
"workPhone": "string",
"zipcode": "string"
}
The identifier of the user, configured to log in to the Identity provider.
The address.
The city.
The company.
The country.
The country code.
The country name.
The customer number.
The email address of the user.
True if the user's e-mail address has been verified.
The end-user license agreement information.
The first name of the user.
The last name of the user.
The password. Combination of characters, numbers and special symbols that is hard to guess.
The reference link to the user profile.
The user's state.
The user's state code.
The user's state name.
Terms and conditions.
The trade ID.
The unique identifier of the user, on behalf of which the token was issued.
Define user profile with default organization, locale and language.
The username of the user.
The web site.
The work phone number.
The ZIP code.
The user is not authorized to use the API
{
"cspErrorCode": "string",
"errorCode": "string",
"message": "string",
"moduleCode": 0,
"requestId": "string",
"statusCode": 0
}
cspErrorCode
errorCode
message
moduleCode
requestId
statusCode
The user is forbidden to use the API
{
"cspErrorCode": "string",
"errorCode": "string",
"message": "string",
"moduleCode": 0,
"requestId": "string",
"statusCode": 0
}
cspErrorCode
errorCode
message
moduleCode
requestId
statusCode
No user with given token exists
{
"cspErrorCode": "string",
"errorCode": "string",
"message": "string",
"moduleCode": 0,
"requestId": "string",
"statusCode": 0
}
cspErrorCode
errorCode
message
moduleCode
requestId
statusCode
The user has sent too many requests
{
"cspErrorCode": "string",
"errorCode": "string",
"message": "string",
"moduleCode": 0,
"requestId": "string",
"statusCode": 0
}
cspErrorCode
errorCode
message
moduleCode
requestId
statusCode
An unexpected error has occurred while processing the request
{
"cspErrorCode": "string",
"errorCode": "string",
"message": "string",
"moduleCode": 0,
"requestId": "string",
"statusCode": 0
}
cspErrorCode
errorCode
message
moduleCode
requestId
statusCode