| title | Update regionalAndLanguageSettings |
|---|---|
| description | Update the regional and language settings of a user. |
| author | jasonbro |
| ms.localizationpriority | medium |
| ms.subservice | entra-users |
| doc_type | apiPageType |
| ms.date | 04/17/2024 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Update some or all of the properties of a regionalAndLanguageSettings object.
[!INCLUDE national-cloud-support]
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
[!INCLUDE permissions-table]
To update all of a user's regional and language settings:
PUT /me/settings/regionalAndLanguageSettings
PUT /users/{user-id | userPrincipalName}/settings/regionalAndLanguageSettings[!INCLUDE me-apis-sign-in-note]
To update a subset of the properties of a user's regional and language settings:
PATCH /me/settings/regionalAndLanguageSettings
PATCH /users/{user-id | userPrincipalName}/settings/regionalAndLanguageSettings[!INCLUDE me-apis-sign-in-note]
| Header | Value |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type | application/json. Required. |
PUT: In the request body, supply a regionalAndLanguageSettings object.
PATCH: Only supply the values for relevant fields that should be updated. Existing properties that are not included in the request body will maintain their previous values or be recalculated based on changes to other property values. For best performance you shouldn't include existing values that haven't changed.
If successful, this method returns a 204 No Content response code. It doesn't return anything in the response body.
The following example shows a request.
PUT https://graph.microsoft.com/beta/me/settings/regionalAndLanguageSettings
Content-type: application/json
{
"defaultDisplayLanguage": {
"locale": "en-US"
},
"authoringLanguages": [
{
"locale": "fr-FR"
},
{
"locale": "de-DE"
}
],
"defaultTranslationLanguage": {
"locale": "en-US"
},
"defaultSpeechInputLanguage": {
"locale": "en-US"
},
"defaultRegionalFormat": {
"locale": "en-GB"
},
"regionalFormatOverrides": {
"calendar": "Gregorian Calendar",
"firstDayOfWeek": "Sunday",
"shortDateFormat": "yyyy-MM-dd",
"longDateFormat": "dddd, MMMM d, yyyy",
"shortTimeFormat": "HH:mm",
"longTimeFormat": "h:mm:ss tt",
"timeZone": "Pacific Standard Time"
},
"translationPreferences": {
"translationBehavior": "Yes",
"languageOverrides": [
{
"languageTag": "fr",
"translationBehavior": "Yes"
}
]
}
}[!INCLUDE snippet-not-available] [!INCLUDE sdk-documentation]
[!INCLUDE snippet-not-available] [!INCLUDE sdk-documentation]
[!INCLUDE snippet-not-available] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE snippet-not-available] [!INCLUDE sdk-documentation]
[!INCLUDE snippet-not-available] [!INCLUDE sdk-documentation]
[!INCLUDE snippet-not-available] [!INCLUDE sdk-documentation]
The following example shows the response.
HTTP/1.1 204 No ContentThe following example shows a request.
PATCH https://graph.microsoft.com/beta/me/settings/regionalAndLanguageSettings
Content-type: application/json
{
"authoringLanguages": [
{
"locale": "en-US" },
{
"locale": "es-MX" }
],
"defaultRegionalFormat": {
"locale": "en-US"
}
}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
HTTP/1.1 204 No Content