Update authenticationContextClassReference

Namespace: microsoft.graph

Create an authenticationContextClassReference object, if the ID has not been used. If ID has been used, this call updates the authenticationContextClassReference object.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

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) Policy.ReadWrite.ConditionalAccess Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application Policy.ReadWrite.ConditionalAccess Not available.

Note

This method has a known permissions issue and may require consent to multiple permissions.

HTTP request

PATCH /identity/conditionalAccess/authenticationContextClassReferences/{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 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 doesn't return anything in the response body.

Examples

Request

The following example shows a 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
}

Response

The following example shows the response.

HTTP/1.1 204 No Content