You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of Azure CLI v2.54.0, the az account get-access-token command returns a new expires_on field containing a POSIX timestamp. This behavior is a departure from previous versions, in which the local datetime was returned in an expiresOn field. Update AzureCliCredential to also consider the new expires_on field.
scottaddie
changed the title
[Identity] Evaluate expires_on field in AzureCliCredential
[Identity] Evaluate expires_on field in AzureCLICredential
Nov 3, 2023
This change is addressed in C++, and similar changes can be made in other languages.
The gist is:
We want to parse and use the new expires_on field if it exists, as is, as a Posix time (seconds since UTC). In this case, we don't use the existing field at all.
If that new field doesn't exist, use the existing expiresOn field as a fallback, parsed as local time.
The existing expiresOn field deviates a bit from RFC 3339 and doesn't have the timezone info in the string to indicate the local time offset (no Z or +XX:XX), so we assume it is considered local time.
As of Azure CLI v2.54.0, the
az account get-access-token
command returns a newexpires_on
field containing a POSIX timestamp. This behavior is a departure from previous versions, in which the local datetime was returned in anexpiresOn
field. UpdateAzureCliCredential
to also consider the newexpires_on
field.Related links:
az account get-access-token
: Returnexpires_on
as POSIX timestamp azure-cli#27476The text was updated successfully, but these errors were encountered: