Azure Security Defaults: GET /policies/identitySecurityDefaultsEnforcementPolicy not working

Nick Dowmon 21 Reputation points
2021-03-04T14:34:37.34+00:00

I am trying to access the value of Enable Security Defaults programmatically:

74382-screen-shot-2021-03-04-at-91336-am.png

According to Azure documentation, I should be able to access this value at GET https://graph.microsoft.com/v1.0/policies/identitySecurityDefaultsEnforcementPolicy. Unfortunately, when I send an authenticated request to this endpoint, I get a 400 response with the following body content:

   {  
     "error": {  
       "code": "BadRequest",  
       "message": "Resource not found for the segment 'identiySecurityDefaultsEnforcementPolicy'.",  
       "innerError": {  
         "date": "2021-03-04T13:56:33",  
         "request-id": "97f85668-350d-4438-b44f-ebc1f2771c6d",  
         "client-request-id": "16a4c537-5784-4f59-4036-0f85cba28b6c"  
       }  
     }  
   }  

In addition, I tried hitting this endpoint using the Microsoft Graph Explorer tool, which sent 404 (not 400) a slightly different response:

   {  
     "error": {  
       "code": "ResourceNotFound",  
       "message": "Resource not found.",  
       "innerError": {  
         "date": "2021-03-04T14:26:26",  
         "request-id": "1dc8f7aa-e020-453c-89ab-387efe00ae47",  
         "client-request-id": "453d358f-4dba-4cc8-f99e-1512204fc58b"  
       }  
     }  
   }  

Finally, I tested with both the beta version and the v1.0 version, with similar results.

Is this endpoint deprecated? Am I missing some data in my requests?

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,561 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 95,666 Reputation points MVP
    2021-03-04T15:01:02.277+00:00

    No, it's not deprecated and it works just fine here. It will only work for an M365 org though, not MicrosoftID or the directory associated with your Azure instance.


0 additional answers

Sort by: Most helpful