Update the properties of a fido2AuthenticationMethodConfiguration object, which represents the FIDO2 Security Keys authentication method policy for the Azure AD tenant.
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)
Policy.ReadWrite.AuthenticationMethod
Delegated (personal Microsoft account)
Not supported.
Application
Policy.ReadWrite.AuthenticationMethod
For delegated scenarios, the administrator needs the Authentication Policy AdministratorAzure AD role.
In the request body, supply a JSON representation of a fido2AuthenticationMethodConfiguration object with the values of 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, don't include existing values that haven't changed.
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new AuthenticationMethodConfiguration
{
OdataType = "#microsoft.graph.fido2AuthenticationMethodConfiguration",
State = AuthenticationMethodState.Enabled,
AdditionalData = new Dictionary<string, object>
{
{
"isAttestationEnforced" , "true"
},
},
};
var result = await graphClient.Policies.AuthenticationMethodsPolicy.AuthenticationMethodConfigurations["{authenticationMethodConfiguration-id}"].PatchAsync(requestBody);
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new AuthenticationMethodConfiguration();
$requestBody->set@odatatype('#microsoft.graph.fido2AuthenticationMethodConfiguration');
$requestBody->setState(new AuthenticationMethodState('enabled'));
$additionalData = [
'isAttestationEnforced' => 'true',
];
$requestBody->setAdditionalData($additionalData);
$requestResult = $graphServiceClient->policies()->authenticationMethodsPolicy()->authenticationMethodConfigurationsById('authenticationMethodConfiguration-id')->patch($requestBody);