Get-AzureADUser : Error occurred while executing GetUsers

Yegor Kolesnik 5 Reputation points
2024-01-11T09:28:23.8033333+00:00

Hello. I connected to Azure AD with app registration, using: Connect-AzureAD -tenantid $TenantID -ApplicationId $App_ID -CertificateThumbprint $ThumbPrint and I had successful connection User's image

but than I have had error: Get-AzureADUser -ObjectId 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx' Get-AzureADUser : Error occurred while executing GetUsers Code: Authorization_RequestDenied Message: Insufficient privileges to complete the operation. RequestId: 8f1aa12f-1a38-4989-930b-ddea27f5c186 DateTimeStamp: Thu, 11 Jan 2024 08:42:29 GMT HttpStatusCode: Forbidden HttpStatusDescription: Forbidden HttpResponseStatus: Completed My app has permissions: User's image

Why it doesn't work?

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,811 questions
0 comments No comments
{count} vote

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.