Your Azure credentials have not been set up or have expired, please run Connect-AzAccount to set up your Azure credentials. Method not found: 'Void Azure.Identity.BrokeredAuthentication.SharedTokenCacheCredentialBrokerOptions..ctor(Azure.Identity.TokenCac

EnterpriseArchitect 6,041 Reputation points
2024-01-10T05:50:19.9733333+00:00

Hi All,

How can I fix the issue with the Microsoft Azure PowerShell module like below?

I am the Global Administrator but not sure why this is still throwing the error:

Connect-AzAccount 
Get-AzRoleAssignment -SignInName ******@domain.com

Get-AzRoleAssignment : Your Azure credentials have not been set up or have expired, please run Connect-AzAccount to set up your Azure credentials.
Method not found: 'Void Azure.Identity.BrokeredAuthentication.SharedTokenCacheCredentialBrokerOptions..ctor(Azure.Identity.TokenCachePersistenceOptions)'.
At line:1 char:1
+ Get-AzRoleAssignment -SignInName ******@domain.com
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-AzRoleAssignment], AzPSArgumentException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Resources.GetAzureRoleAssignmentCommand
Windows for business | Windows Server | User experience | PowerShell
Microsoft Security | Microsoft Graph
{count} votes

Accepted answer
  1. dashanan13 930 Reputation points
    2024-02-15T23:54:38.9133333+00:00

    Hei @EnterpriseArchitect , Thank you for contacting Microsoft Community. As i understand, you are facing authentication issue while running a script. The issue has been dicussed and has an accepted answer in the following thread: https://techcommunity.microsoft.com/t5/windows-powershell/get-azaccesstoken-quot-method-not-found-void-quot/m-p/3916098 If this helped, do mark this as answer.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.