Skip to content

Latest commit

 

History

History
173 lines (141 loc) · 5.57 KB

File metadata and controls

173 lines (141 loc) · 5.57 KB
title Restore conditionalAccessPolicy
description Restore a deleted conditionalAccessPolicy object
author ashyasingh
ms.date 10/07/2025
ms.localizationpriority medium
ms.subservice entra-sign-in
doc_type apiPageType

Restore conditionalAccessPolicy

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

Restore a deleted conditionalAccessPolicy object.

[!INCLUDE national-cloud-support]

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.

[!INCLUDE permissions-table]

[!INCLUDE rbac-conditionalaccess-apis-write]

HTTP request

POST /identity/conditionalAccess/deletedItems/policies/{conditionalAccessPolicyId}/restore 

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this action returns a 200 OK response code and a conditionalAccessPolicy in the response body.

Examples

Request

The following example shows a request.

POST https://graph.microsoft.com/beta/identity/conditionalAccess/deletedItems/policies/59f2aa7a-4c49-4baa-932f-0300792e06c2/restore

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#microsoft.graph.conditionalAccessPolicy",
    "id": "59f2aa7a-4c49-4baa-932f-0300792e06c2",
    "templateId": null,
    "displayName": "Calvin all users all apps MFA",
    "createdDateTime": "2025-09-05T22:10:06.334722Z",
    "modifiedDateTime": null,
    "state": "disabled",
    "deletedDateTime": null,
    "partialEnablementStrategy": null,
    "sessionControls": null,
    "conditions": {
        "userRiskLevels": [],
        "signInRiskLevels": [],
        "clientAppTypes": [
            "all"
        ],
        "platforms": null,
        "locations": null,
        "times": null,
        "deviceStates": null,
        "devices": null,
        "clientApplications": null,
        "applications": {
            "includeApplications": [
                "All"
            ],
            "excludeApplications": [],
            "includeUserActions": [],
            "includeAuthenticationContextClassReferences": [],
            "applicationFilter": null
        },
        "users": {
            "includeUsers": [
                "All"
            ],
            "excludeUsers": [],
            "includeGroups": [],
            "excludeGroups": [],
            "includeRoles": [],
            "excludeRoles": [],
            "includeGuestsOrExternalUsers": null,
            "excludeGuestsOrExternalUsers": null
        }
    },
    "grantControls": {
        "operator": "OR",
        "builtInControls": [
            "mfa"
        ],
        "customAuthenticationFactors": [],
        "termsOfUse": [],
        "authenticationStrength": null
    }
}