---
title: "PATCH /{tenantID}/users/{upnOrObjectId}"
method: PATCH
path: "/{tenantID}/users/{upnOrObjectId}"
tags: ["User"]
---

# PATCH /{tenantID}/users/{upnOrObjectId}

`PATCH /{tenantID}/users/{upnOrObjectId}`

Updates a user.

## Path parameters

- `upnOrObjectId` string, required
- `tenantID` string, required

## Query parameters

- `api-version` string, required

## Request body

- UserUpdateParameters
  - `givenName` string — The given name for the user.
  - `immutableId` string — This must be specified if you are using a federated domain for the user's userPrincipalName (UPN) property when creating a new user account. It is used to associate an on-premises Active Directory user account with their Azure AD user object.
  - `surname` string — The user's surname (family name or last name).
  - `usageLocation` string — A two letter country code (ISO standard 3166). Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. Examples include: "US", "JP", and "GB".
  - `userType` 'Member' | 'Guest' — A string value that can be used to classify user types in your directory, such as 'Member' and 'Guest'.

## Response `204`

No Content.

## Other responses

- `default` — Error response describing why the operation failed.

---

[API](https://skmtc.net/windows/apis/graphrbac.md) · [All operations](https://skmtc.net/windows/apis/graphrbac/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/windows/graphrbac/versions/003d8a5138c2/schema)
