Get-AzAccessToken broken for non-WAM users #25028
Labels
Accounts
Issues in Az.Accounts except authentication related
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
customer-reported
Tracking
We will track status and follow internally
WAM
Web Account Manager
Uh oh!
There was an error while loading. Please reload this page.
Description
Get-AzAccessToken throws an exception (where it used to work), and breaks authentication.
Because of ADO's requirements, we have been using a "normal" user account with MFA disabled, for access to git from AKS (Flux).
We generate a PAT token in an Azure pipeline, by using the
(Get-AzAccessToken).Token
in an http header ... but in Az.Accounts 3.0.0 it is now throwing this error exception (I zeroed out the GUID) when we try toGet-AzAccessToken
:We ARE calling
Connect-AzAccount
with all the parameters, the problem is that even though we're logging in with-Credential
Azure still expects to use WAM.It seems to me that WAM should be disabled for the process when we use the
-Credential
parameter onConnect-AzAccount
WORKAROUND:
Manually disable WAM before running anything in the Azure Pipeline...
Issue script & Debug output
Environment data
Module versions
Error output
# Same info that's in debug output above
The text was updated successfully, but these errors were encountered: