Update b2cAuthenticationMethodsPolicy

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Update the properties of a b2cAuthenticationMethodsPolicy object.

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
Delegated (work or school account) Policy.ReadWrite.AuthenticationMethod
Delegated (personal Microsoft account) Policy.ReadWrite.AuthenticationMethod
Application Policy.ReadWrite.AuthenticationMethod

HTTP request

PATCH /policies/b2cAuthenticationMethodsPolicy

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 b2cAuthenticationMethodsPolicy object.

The following table shows the properties that are required when you update the b2cAuthenticationMethodsPolicy.

Property Type Description
isEmailPasswordAuthenticationEnabled Boolean The tenant admin can configure local accounts using email if the email and password authentication method is enabled.
isUserNameAuthenticationEnabled Boolean The tenant admin can configure local accounts using username if the username and password authentication method is enabled.
isPhoneOneTimePasswordAuthenticationEnabled Boolean The tenant admin can configure local accounts using phone number if the phone number and one-time password authentication method is enabled.

Response

If successful, this method returns a 204 No Content response code and an empty response body.

Examples

Request

The following is an example of the request.

PATCH https://graph.microsoft.com/beta/policies/b2cAuthenticationMethodsPolicy

{
    "isEmailPasswordAuthenticationEnabled": false,
    "isUserNameAuthenticationEnabled": true,
    "isPhoneOneTimePasswordAuthenticationEnabled": true
}

Response

The following is an example of the response.

HTTP/1.1 204 NO CONTENT