Create or update language

Namespace: microsoft.graph

This method is used to create or update a custom language in an Azure AD B2C user flow.

Note: You must enable language customization in the Azure AD B2C user flow before you can create a custom language. For more information, see Update b2cIdentityUserFlow.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) IdentityUserFlow.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application IdentityUserFlow.ReadWrite.All

The work or school account needs to belong to one of the following roles:

  • Global administrator
  • External Identity User Flow administrator

HTTP request

PUT /identity/b2cUserFlows/{id}/languages/{id}

Request headers

Name Description
Authorization Bearer {token}. Required.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of the userFlowLanguageConfiguration object.

The following table shows the properties that can be optionally provided when you create the userFlowLanguageConfiguration.

Property Type Description
id String The identifier of the language. This field is Language ID tag RFC 5646 compliant and must be a documented Language ID. If provided in the request body, it must match the identifer provided in the request URL.
isEnabled Boolean Indicates whether the language is enabled within the user flow. If this is not provided in the request, isEnabled will be set to 'true'.

Response

If successful, this method returns a 201 Created response code and a userFlowLanguageConfiguration object in the response body.

Examples

Example 1: Create a custom language in an Azure AD B2C user flow

Request

The following is an example of the request.

PUT https://graph.microsoft.com/beta/identity/b2cUserFlows/B2C_1_CustomerSignUp/languages/es-ES
Content-Type: application/json

{
  "id": "es-ES",
  "isEnabled": true
}

Response

The following is an example of the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 201 Created
Content-Type: application/json

{
  "@odata.context": "https://graph.microsoft.com/beta/$metadata#identity/b2cUserFlows('B2C_1_CustomerSignUp')/languages/$entity",
  "id": "es-ES",
  "isEnabled": true,
  "displayName": "Spanish (Spain)"
}

Example 2: Update a custom language in an Azure AD B2C user flow

Request

The following is an example of the request.

PUT https://graph.microsoft.com/beta/identity/b2cUserFlows/B2C_1_CustomerSignUp/languages/es-ES
Content-Type: application/json

{
  "isEnabled": false
}

Response

The following is an example of the response.

HTTP/1.1 204 No Content