-
Notifications
You must be signed in to change notification settings - Fork 4k
Get-AzAccessToken failed #24963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey @NathOsull thanks for reporting. Could you run a |
Hi @NathOsull, currently you can workaround it in the following ways If you are in a Windows system, login interactive before you run any other Azure PowerShell cmdlets
If you have no access to Windows system with UI, you can disable WAM temporarily
|
We are experiencing the same error with no change on our side to powershell scripts. It suddently stopped working and we are getting similar error when attempting to get token after successful connection with Connect-AzAccount
It gives error
We have verified there is no MFA or conditional access policy blocking the credential account. Have also tested with AuthScope but this gives no difference in the error and tenantId is already present in Connect-AzAccount as advised. When running suggested workaround to disable WAM it works, but this shouldnt be necessary?
As mentioned this has worked for multiple months and started failing today, it leads us to think there has been a bug released in the Az powershell module? any ideas/referances? it looks similar to this issue reported as well ##24967 |
I ran this and now it works again
Ran this ^^ and all working (thanks by the way) |
@NathOsull what is the way to Connect-AzAccount before you run Get-AzAccessToken? @NathOsull @gudbrand3
If you login with user authentication flow (username password, interactively, device code) before, you have to run Connect-AzAccount interactively login before you run any other Azure PowerShell cmdlets after you move to Az.Accounts 3.0.0. Re-enable WAM, please run
and then restart the PowerShell session Check whether WAM is enabled
If you enable WAM, run |
The reporter doesn't mention which auth flow they use to login. But no matter what it is, the issue should be mitigated in Az.Accounts 3.0.1. Close the issue now. |
Uh oh!
There was an error while loading. Please reload this page.
Description
When trying to get access tokens I can no longer use the create token.
Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: