Create authenticationContextClassReference

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.

Create a new authenticationContextClassReference.

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

Note

This API has a known issue related to permissions.

HTTP request

POST /identity/conditionalAccess/authenticationContextClassReferences

Request headers

Name Description
Authorization Bearer {token}. Required.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of a authenticationContextClassReference object.

Response

If successful, this method returns a 201 Created response code and a new authenticationContextClassReference object in the response body.

Examples

Request

The following example shows creating a new authenticationcontextclassreference that is available for apps to use.

POST https://graph.microsoft.com/beta/identity/conditionalAccess/authenticationContextClassReferences
Content-type: application/json

{
    "id": "c1",
    "displayName": "Contoso medium",
    "description": "Medium protection level defined for Contoso policy",
    "isAvailable": true
}

Response

The following is an example of the response.

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#conditionalAccess/authenticationContextClassReference/$entity",
    "id": "c1",
    "displayName": "Contoso medium",
    "description": "Medium protection level defined for Contoso policy",
    "isAvailable": true
}