AzureCliCredential invokes az get-access-token to acquire tokens. This command gives the token's expiry time in local time as produced by datetime.fromtimestamp (here), with no timezone information. Because AzureCliCredential uses a naive datetime to convert this string to epoch seconds, it can provide a token with an incorrect expires_on value, causing a client to send an expired access token.