Skip to main content

Get User

Retrieves a single user by their user principal name (UPN).

Endpoint: GET /v1/api/user

Query parameters

ParameterTypeRequiredDescription
userPrincipalNamestringYesThe user's UPN (e.g., anna.eriksson@contoso.com)

Example request

GET /v1/api/user?userPrincipalName=anna.eriksson@contoso.com

Response

Success (200 OK)

{
"data": {
"user": {
"userPrincipalName": "anna.eriksson@contoso.com",
"displayName": "Anna Eriksson",
"givenName": "Anna",
"surname": "Eriksson",
"department": "Engineering",
"jobTitle": "Software Engineer"
}
}
}

The user object contains the fields synced from Entra ID. The exact set of fields depends on what's populated in your Entra directory.

Errors

400 Bad Request - Missing query parameter

{
"error": {
"code": "BAD_REQUEST",
"message": "Missing required query parameter: userPrincipalName"
}
}

404 Not Found - User doesn't exist

{
"error": {
"code": "NOT_FOUND",
"message": "User not found"
}
}