Get-AzureADPolicy is not working

Imtiyaz Ali 1 Reputation point
2020-04-08T15:26:11.823+00:00

I am getting below error while running command Get-AzureADPolicy

PS C:\WINDOWS\system32> Get-AzureADPolicy
Get-AzureADPolicy : Error occurred while executing GetPolicies
Code: Request_InvalidRequestUrl
Message: Request url was invalid. The request should be like /tenantdomainname/Entity or /$metadata. Tenant domain name can be any of the verified,
unverified domain names or context id.
InnerError:
RequestId: ae9de1d2-7c5c-4c22-8151-bac786e3262f
DateTimeStamp: Wed, 08 Apr 2020 15:23:22 GMT
HttpStatusCode: BadRequest
HttpStatusDescription: Bad Request
HttpResponseStatus: Completed
At line:1 char:1

  • Get-AzureADPolicy
  • ~~~~~~~~~~~~~~~~~
  • CategoryInfo : NotSpecified: (:) [Get-AzureADPolicy], ApiException
  • FullyQualifiedErrorId : Microsoft.Open.MSGraphBeta.Client.ApiException,Microsoft.Open.MSGraphBeta.PowerShell.GetPolicy

PS C:\WINDOWS\system32>

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

3 answers

Sort by: Most helpful
  1. Anuj Rana 211 Reputation points
    2020-04-08T20:08:39.107+00:00

    Did you check if you are using latest version for module? it should be 2.0.2.85.

    You can update the same from : https://t.co/kPilxDKnMQ?amp=1

    Please confirm if this fixes your issue. I have tested Get-AzureADPolicy few mins back and it is working as expected on 2.0.2.85.

    3 people found this answer helpful.

  2. Vasil Michev 103K Reputation points MVP
    2020-04-08T16:42:05.25+00:00

    Getting the same experience here, so it seems like it's something on the backend. Open a support case if you haven't done it already.


  3. Imtiyaz Ali 1 Reputation point
    2020-05-08T06:27:28.26+00:00

    Thanks everybody!!
    Issue resolve as this is working with version 2.0.2.89.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.