Skip to main content

Get a user by user ID

Use this example to retrieve a user's details by user ID with a raw Administration API request.

Authenticate first

This example assumes you already completed Authenticate an Admin API application and are sending the returned auth token in the Authorization header.

Submit a POST request to retrieve user details for a particular User ID. The format of the URL is:

https://<domainname>.<region>.trustedauth.com/api/web/v3/users/userid

An Authorization header field must be included in the header section of this request. The Authorization header stores the value received as "token" in the authentication request. The Authorization header can be sent with or without a type value of "Bearer". For example:

Authorization: Bearer <token>

or

Authorization: <token>

The body of this request must contain UserID. For example:

{
"userId": "John"
}

In this example, all the required input parameters have been provided. The request would succeed and generate a response that includes the user's information. For example:

{
"id": "2c422a2f-e8ae-4af8-8b03-e1ce0ddde0b0",
"userId": "john",
"firstName": "john",
"lastName": "smith",
"email": "johnsmith@organization.com",
"mobile": "+16138561234",
"phone": "+161385699876",
"locale": null,
"state": "ACTIVE",
"externalId": null,
"externalSource": null,
"migrated": null,
"locked": false,
"lockoutExpiry": null,
"otpCreateTime": null,
"grids": [],
"tokens": [
{
"id": "9a2edcc5-46f0-4fff-89b1-13c0f73e1a5c",
"type": "ENTRUST_SOFT_TOKEN",
"serialNumber": "62461-69384",
"loadDate": "2018-05-29T19:12:54.000+0000",
"lastUsedDate": null,
"state": "ACTIVATING",
"platform": null,
"registeredForTransactions": false,
"name": null,
"allowedActions": ["REACTIVATE", "ACTIVATE_COMPLETE", "DELETE"],
"description": null,
"userId": null
}
],
"smartCredentials": [],
"tempAccessCode": null,
"userAttributeValues": [],
"userAliases": [
{
"id": "43422a2f-e8ae-4af8-8b03-e1ce0ddde0b0",
"userId": "c633a710-70bd-411e-86be-e1898f1b19f5",
"value": "johnny",
"type": "CUSTOM"
},
{
"id": "2c422a2f-e8ae-4af8-8b03-e1ce0ddde0b0",
"userId": "c633a710-70bd-411e-86be-e1898f1b19f5",
"value": "john",
"type": "USERID"
}
],
"groups": [],
"type": "MGMT_UI"
}