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
Gah, I hate that pressing enter after entering a title automatically creates the issue π΅βπ«
I'm currently using autorest with CLI auth for some long running operations, and occasionally, I see the following error:
Future#WaitForCompletion: the number of retries has been exceeded: StatusCode=401 -- Original Error: Code="ExpiredAuthenticationToken" Message="The access token expiry UTC time '5/25/2021 7:50:32 PM' is earlier than current UTC time '5/25/2021 7:54:13 PM'."
I'm currently calling NewAuthorizerFromCLIWithResource to obtain the Authorizer. From what I can tell, this:
Gets a CLI token by invoking az account get-access-token
Converts it to ADALToken
Returns a bearer authorizer wrapping the ADALToken.
When debugging this code, I noticed a few things:
The token returned from az account get-access-token will expire anywhere between 5 and 60 minutes.
The refresh token will be empty.
The ExpiresIn is hard coded to 60 minutes.
I'm trying to figure out ways to either extend the lifetime or refresh this token. Any suggestions?
The text was updated successfully, but these errors were encountered:
jkotalik
changed the title
Ways to set refresh token or extend expiration of ADAL token for long running operations.
Ways to set refresh token or extend expiration of ADAL token for long running operations
Sep 1, 2021
Gah, I hate that pressing enter after entering a title automatically creates the issue π΅βπ«
I'm currently using autorest with CLI auth for some long running operations, and occasionally, I see the following error:
I'm currently calling NewAuthorizerFromCLIWithResource to obtain the Authorizer. From what I can tell, this:
az account get-access-token
When debugging this code, I noticed a few things:
az account get-access-token
will expire anywhere between 5 and 60 minutes.I'm trying to figure out ways to either extend the lifetime or refresh this token. Any suggestions?
The text was updated successfully, but these errors were encountered: