Update the properties of a softwareOathAuthenticationMethodConfiguration object, which represents the third-party software OATH authentication method policy for the Azure AD tenant.
In the request body, supply a JSON representation of the softwareOathAuthenticationMethodConfiguration 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.
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new SoftwareOathAuthenticationMethodConfiguration
{
OdataType = "#microsoft.graph.softwareOathAuthenticationMethodConfiguration",
State = AuthenticationMethodState.Disabled,
};
var result = await graphClient.Policies.AuthenticationMethodsPolicy.AuthenticationMethodConfigurations["{authenticationMethodConfiguration-id}"].PatchAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc policies authentication-methods-policy authentication-method-configurations patch --authentication-method-configuration-id {authenticationMethodConfiguration-id} --body '{\
"@odata.type": "#microsoft.graph.softwareOathAuthenticationMethodConfiguration",\
"state": "disabled"\
}\
'
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new SoftwareOathAuthenticationMethodConfiguration();
$requestBody->setOdataType('#microsoft.graph.softwareOathAuthenticationMethodConfiguration');
$requestBody->setState(new AuthenticationMethodState('disabled'));
$result = $graphServiceClient->policies()->authenticationMethodsPolicy()->authenticationMethodConfigurations()->byAuthenticationMethodConfigurationId('authenticationMethodConfiguration-id')->patch($requestBody)->wait();
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(request_adapter)
request_body = SoftwareOathAuthenticationMethodConfiguration(
odata_type = "#microsoft.graph.softwareOathAuthenticationMethodConfiguration",
state = AuthenticationMethodState.Disabled,
)
result = await graph_client.policies.authentication_method_policy.authentication_method_configurations.by_authentication_method_configuration_id('authenticationMethodConfiguration-id').patch(body = request_body)