Skip to main content

Update User

Endpoint: https://api.adcyma.com/v1/api/user
Method: PATCH
Description: Updates one or more attributes of an existing Entra ID user, identified by userPrincipalName. Only the fields you include are changed. Everything else is left as-is. Updates are queued and applied asynchronously.

Request Headers:

  • X-Company-ID: Your tenant identifier.
  • X-Api-User: API username.
  • X-Api-Key: API secret key.
  • Content-Type: application/json.

Request Body:

  • userPrincipalName (required): UPN of the user to update.
  • firstname: New given name.
  • surname: New family name.
  • jobTitle: New job title.
  • department: New department.
  • company: New company name.
  • office: New office location.
  • city: New city.
  • country: New country (ISO 3166-1 alpha-2 code recommended).
  • streetAddress: New street address.
  • postalCode: New postal/ZIP code.
  • preferredLanguage: New language tag (BCP-47, e.g. sv-SE).
  • accountEnabled: true to enable the account, false to disable it. Useful for temporarily blocking sign-in without removing the user.

Fields not in this list (like manager) can't be changed here. Use the portal instead.

Example Request:

PATCH /v1/api/user HTTP/1.1
Host: api.adcyma.com
X-Company-ID: AcmeAB-1f2c8a90
X-Api-User: integrations-bot
X-Api-Key: your-secret-key
Content-Type: application/json

{
"userPrincipalName": "john.doe@example.com",
"jobTitle": "Senior Software Engineer",
"department": "Platform",
"city": "Lund",
"accountEnabled": true
}

Response:

On success, the update is queued. The change appears in Entra ID and in the People Hub shortly after.

Success Response (200 OK):

{
"data": {
"message": "User update queued successfully"
}
}

Error Response (400 Bad Request):

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

Error Response (401 Unauthorized):

{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API credentials"
}
}

Error Response (404 Not Found):

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

Error Response (429 Too Many Requests):

{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests"
}
}