Szerkesztés

Megosztás a következőn keresztül:


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

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.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) IdentityUserFlow.ReadWrite.All Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application IdentityUserFlow.ReadWrite.All Not available.

Important

In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. External ID User Flow Administrator is the least privileged role supported for this operation.

HTTP request

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

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
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 you don't specify a value for this property 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 example shows a 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 example shows 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 example shows a request.

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

{
  "isEnabled": false
}

Response

The following example shows the response.

HTTP/1.1 204 No Content