trying to cennect to azure through powershell, and get this error message. Who can help?

Maarten van Gemert 6 Reputation points
2022-04-01T12:30:46.33+00:00

WARNING: Unable to acquire token for tenant 'organizations' with error 'SharedTokenCacheCredential authentication failed: AADSTS9002332: Application '1950a258-227b-4e31-a9cf-717495945fc2'(Microsoft Azure PowerShell)
is configured for use by Azure Active Directory users only. Please do not use the /consumers endpoint to serve this request

Azure Lab Services
Azure Lab Services
An Azure service that is used to set up labs for classrooms, trials, development and testing, and other scenarios.
256 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Prrudram-MSFT 19,961 Reputation points
    2022-04-01T16:54:45.083+00:00

    Hello @Maarten van Gemert ,

    Thank you for reaching out to the Microsoft Q&A platform. Happy to answer your question.
    Some work arounds that you may try.

    • Please clear the cache and try running the following command in order : Install-Module Az Import-Module Az Connect-AzAccount with” Windows PowerShell ISE".
    • Try to run your powershell as admin, update the module with Update-Module -Name Az, then login again.
    • Try to install AZ module on your PowerShell and set your execution policy to remote signed.
    • Give your tenant ad directly Connect-AzAccount -TenantId cf2a0-*******
    • Connect-AzAccount -UseDeviceAuthentication.

    Please "Accept as Answer" and Upvote if any of the above helped to help others in the community looking for remediation for similar issues.

    4 people found this answer helpful.