In the request body, supply only the values for properties that should be updated. Existing properties that aren't included in the request body maintains their previous values or be recalculated based on changes to other property values.
The following table specifies the properties that can be updated.
Property
Type
Description
displayName
String
The display name is the friendly name of the authenticationContextClassReference. This value should be used to identify the authentication context class reference when building user facing admin experiences. For example, selection UX.
description
String
A short explanation of the policies that are enforced by authenticationContextClassReference. This value should be used to provide secondary text to describe the authentication context class reference when building user facing admin experiences. For example, selection UX.
isAvailable
Boolean
Indicates whether the authenticationContextClassReference has been published by the security admin and is ready for use by apps. When it is set to false it should not be shown in authentication context selection UX, or used to protect app resources. It will be shown and available for Conditional Access policy authoring.
A request using an empty JSON object, with no properties, will create a new authenticationContextClassReference object, if one with the specified ID doesn't exist, and the properties are set null or have default values.
Response
If successful, this method returns a 204 No Content response code. It does not return anything in the response body.
Examples
Request
The following is an example of the request. If an object with the ID c1 doesn't exist, this request creates the new object; if the object exists, this request updates the specified properties.
PATCH https://graph.microsoft.com/v1.0/identity/conditionalAccess/authenticationContextClassReferences/c1
Content-type: application/json
{
"displayName": "Contoso medium",
"description": "Medium protection level defined for Contoso policy",
"isAvailable": true
}
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new AuthenticationContextClassReference
{
DisplayName = "Contoso medium",
Description = "Medium protection level defined for Contoso policy",
IsAvailable = true,
};
var result = await graphClient.Identity.ConditionalAccess.AuthenticationContextClassReferences["{authenticationContextClassReference-id}"].PatchAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc identity conditional-access authentication-context-class-references patch --authentication-context-class-reference-id {authenticationContextClassReference-id} --body '{\
"displayName": "Contoso medium",\
"description": "Medium protection level defined for Contoso policy",\
"isAvailable": true\
}\
'
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new AuthenticationContextClassReference();
$requestBody->setDisplayName('Contoso medium');
$requestBody->setDescription('Medium protection level defined for Contoso policy');
$requestBody->setIsAvailable(true);
$result = $graphServiceClient->identity()->conditionalAccess()->authenticationContextClassReferences()->byAuthenticationContextClassReferenceId('authenticationContextClassReference-id')->patch($requestBody)->wait();
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(request_adapter)
request_body = AuthenticationContextClassReference(
display_name = "Contoso medium",
description = "Medium protection level defined for Contoso policy",
is_available = True,
)
result = await graph_client.identity.conditional_access.authentication_context_cla_references.by_authentication_context_clas_reference_id('authenticationContextClassReference-id').patch(body = request_body)