Entra

How to restore deleted Entra ID Conditional Access policies and Named Locations

· 2 min read · Entra

Entra ID Conditional Access policies can now be restored for up to 30 days after deletion. Next to deleted users, groups, and apps, admins can now also restore deleted Conditional Access Policies, Trusted Locations, and Cross Tenant Access Policies. Learn more: policyDeletableItem resource type - Microsoft Graph beta | Microsoft Learn

Screenshot showing Entra ID deleted Conditional Access policies and named locations (step 1)

This information can be found in the Entra Admin Center, but you can also access it directly through the Graph API.

Screenshot showing Entra ID deleted Conditional Access policies and named locations (step 2)

Graph API
GET https://graph.microsoft.com/beta/conditionalAccess/deletedItems/policies

Screenshot showing Entra ID deleted Conditional Access policies and named locations (step 3)

Deleted policies can easily be tracked and restored from the Entra Admin Center:

Screenshot showing Entra ID deleted Conditional Access policies and named locations (step 4)

To restore the policy using Graph Explorer, use the policy ID of the deleted policy.

Graph API
POST https://graph.microsoft.com/beta/conditionalAccess/deletedItems/policies/847f5c83-711c-4121-b556-75ab333ddd35/restore

Screenshot showing Entra ID deleted Conditional Access policies and named locations (step 5)

Restore Trusted Locations#

Trusted Locations can also be restored from the Entra Admin Center.

Screenshot showing Entra ID deleted Conditional Access policies and named locations (step 6)

Using Graph Explorer, you can list, restore, or permanently delete a soft-deleted Named Location.To list all deleted Named Locations for example, use:

Graph API
GET https://graph.microsoft.com/beta/identity/conditionalAccess/deletedItems/namedLocations

Screenshot showing Entra ID deleted Conditional Access policies and named locations (step 7)

To restore a deleted Named Location using Graph Explorer:

Graph API
POST https://graph.microsoft.com/beta/identity/conditionalAccess/deletedItems/namedLocations/1925365e-6689-4657-a429-e94871763fc7/restore

Permanently delete soft-deleted objects#

Soft-deleted objects, such as policies and named locations, can be permanently deleted.

Conditional Access policies and Named Locations can be deleted through the Entra admin center directly.

Screenshot showing Entra ID deleted Conditional Access policies and named locations (step 8)

Deleted by (actor)#

At the time of writing, information for deleted by (actor) or recently deleted policies is not yet available.

Screenshot showing Entra ID deleted Conditional Access policies and named locations (step 9)

This information can be found in the Audit Logs for the time being. Look for activity type:

  • Delete conditional access policy
  • Delete named location\

Screenshot showing Entra ID deleted Conditional Access policies and named locations (step 10)

The actor for the deleted Named Locations is already there.

Screenshot showing Entra ID deleted Conditional Access policies and named locations (step 11)

(Bonus) How to prevent unwanted deletion of objects#

Protected Actions, a feature of Entra ID, is capable of restricting the deletion of Conditional Access policies and Named Locations by applying Authentication Context to specific actions.

What are protected actions in Microsoft Entra ID? - Microsoft Entra ID | Microsoft Learn

Screenshot showing Entra ID deleted Conditional Access policies and named locations (step 12)

Let’s wrap up#

It’s good to see that more and more objects in Entra ID are supported for soft-deletion, so that admins are able to restore them, if needed. To leverage the full potential, consider using the Graph API instead, as not all features are available in the Entra Admin Center (yet). policyDeletableItem resource type - Microsoft Graph beta | Microsoft Learn

Stay safe!

Comments

Comments load when you scroll here.