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.
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
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
8,329 questions
Microsoft Security | Microsoft Graph
13,730 questions