PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,915 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Good afternoon everyone.
Greetings.
I need help for an error that the Get-AzureADUser command started throwing:
Connect-AzureAD -TenantId $tenantid -CertificateThumbprint $appazurethumbprint -ApplicationId $appazureid
Get-AzureADUser -All $True
The error is the following:
Microsoft.Open.AzureAD16.Client.ApiException: Error occurred while executing GetUsers
Code: Authentication_Unauthorized
Message: Access blocked to AAD Graph API for this application. https://aka.ms/AzureADGraphMigration.
HttpStatusCode:Forbidden
HttpStatusDescription: Forbidden
HttpResponseStatus: Completed
at Microsoft.Open.AzureAD16.Client.Configuration.<>c.<.cctor>b__47_0(String methodName, IRestResponse response) in C:\__w\1\s\src\dev\PowerShell.V2\AzureAD16.Client\Client\Configuration.cs:line 188
at Microsoft.Open.AzureAD16.Api.UserApi.GetUsersWithHttpInfo(String tenantId, String authorization, String cmdletName, String clientRequestId, String apiVersion, String objectId, Nullable`1 all, Nullable`1
top, String skiptoken, String filter, String orderby) in C:\__w\1\s\src\dev\PowerShell.V2\AzureAD16.Client\Api\UserApi.cs:line 4613
at Microsoft.Open.AzureAD16.PowerShell.GetUsers.ProcessRecord() in C:\__w\1\s\src\dev\PowerShell.V2\AzureAD16.PowerShell\AzureAD16.PowerShell.AutoGen\API\UserApi.cs:line 2044
at System.Management.Automation.Cmdlet.GetResults()
at System.Management.Automation.Cmdlet.<Invoke>d__40.MoveNext()
at System.Management.Automation.MshCommandRuntime._WriteObjectsSkipAllowCheck(Object sendToPipeline)
at System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state)
at System.Management.Automation.MshCommandRuntime.WriteObject(Object sendToPipeline, Boolean enumerateCollection)
at System.Management.Automation.Cmdlet.WriteObject(Object sendToPipeline, Boolean enumerateCollection)
at Microsoft.Open.AzureAD16.PowerShell.GetUser.ProcessRecord() in C:\__w\1\s\src\dev\PowerShell.V2\AzureAD16.PowerShell\AzureAD16.PowerShell.AutoGen\API\UserApi.cs:line 258
at System.Management.Automation.CommandProcessor.ProcessRecord())
App permissions are as follows:
I hope you can help me help.
Sincerely,
Jairo Baleta