-
Notifications
You must be signed in to change notification settings - Fork 3k
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
az account get-access-token
returns expiresOn
as null
for managed identity
#20211
Comments
Root causeA quick search on tokenExpirationDate, err := parseExpirationDate(t.ExpiresOn)
if err != nil {
return nil, fmt.Errorf("Error parsing Token Expiration Date %q: %+v", t.ExpiresOn, err)
} But Azure CLI 2.30.0 fails to set
This will be fixed by #20219. WorkaroundThere are 2 possible workarounds: Log in with user or service principal accountRun Install Azure CLI 2.29.2You may also install Azure CLI 2.29.2 where References |
I can reproduce this, |
@sdebruyn, could you try the workaround and let us know if that works? |
I can confirm both workarounds work for me |
az account get-access-token
returns expiresOn
as null
for managed identity
Just as a note for others with the workaround of installing the older 2.29.2 version on Mac. I had to delete the ~/.azure folder first. |
@etiedem, thanks for the information. I am a little bit curious:
|
@jiasli -
followed by my actual access token. |
Thanks for the information. I tested with a docker:
It is indeed pretty smart to replace As for your problem, I don't think this is the same problem as the one in this PR. This PR's issue only happens to managed identity.
|
Receiving "Error parsing Token Expiration Date" when using Azure CLI 2.30.0 with managed identity:
Originally posted by @squillace in #19480 (comment)
The text was updated successfully, but these errors were encountered: