AuthenticationContext.ReadWrite.All
Allows the app to read and update the authentication context information in your organization without a signed-in user.
Permission Details
Read and write all authentication context information
Allows the app to read and update the authentication context information in your organization without a signed-in user.
a88eef72-fed0-4bf7-a2a9-f19df33f8b83
Read and write all authentication context information
Allows the app to read and update all authentication context information in your organization on behalf of the signed-in user.
ba6d575a-1344-4516-b777-1404f5593057
Properties
Properties is shown from beta metadata because a stable v1.0 schema is not available for this resource mapping.
| Property | Type | Description |
|---|---|---|
detail |
authenticationContextDetail |
Describes how the conditional access authentication context was triggered. A value of previouslySatisfied means the auth context was because the user already satisfied the requirements for that authentication context in some previous authentication event. A value of required means the user had to meet the authentication context requirement as part of the sign-in flow. The possible values are: required, previouslySatisfied, notApplicable, unknownFutureValue. |
id |
StringNullable |
The identifier of an authentication context in your tenant. |
JSON Representation
JSON representation is shown from beta metadata because a stable v1.0 schema is not available for this resource mapping.
{
"@odata.type": "#microsoft.graph.authenticationContext",
"id": "String (identifier)",
"detail": "String"
}
Relationships
Relationships metadata is not available for this permission mapping.
View resource documentationGraph Methods
Microsoft Graph v1.0 endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph beta endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph PowerShell v1.0 commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Microsoft Graph PowerShell beta commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Code Examples
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new AuthenticationContextClassReference
{
DisplayName = "Contoso medium",
Description = "Medium protection level defined for Contoso policy",
IsAvailable = true,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Identity.ConditionalAccess.AuthenticationContextClassReferences["{authenticationContextClassReference-id}"].PatchAsync(requestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const authenticationContextClassReference = {
displayName: 'Contoso medium',
description: 'Medium protection level defined for Contoso policy',
isAvailable: true
};
await client.api('/identity/conditionalAccess/authenticationContextClassReferences/c1')
.update(authenticationContextClassReference);
Import-Module Microsoft.Graph.Identity.SignIns
$params = @{
displayName = "Contoso medium"
description = "Medium protection level defined for Contoso policy"
isAvailable = $true
}
Update-MgIdentityConditionalAccessAuthenticationContextClassReference -AuthenticationContextClassReferenceId $authenticationContextClassReferenceId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.authentication_context_class_reference import AuthenticationContextClassReference
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
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_class_references.by_authentication_context_class_reference_id('authenticationContextClassReference-id').patch(request_body)
App Registration
Navigate to Azure Portal
Go to App registrations in Microsoft Entra admin center
Add API Permission
Select your app → API permissions → Add a permission → Microsoft Graph
Select Permission Type
Choose Application permissions or delegated permissions and search for AuthenticationContext.ReadWrite.All
Grant Admin Consent
Application permissions always require admin consent.