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
I had an unhandled exception when calling PersistentAuthHelper.GetToken(string id, string resource) to log into an Azure subscription which I hadn't accessed in a very long time. Unfortunately I didn't document the details (or locate and back up the token cache) before trying a workaround, but the gist was that BaseAuthHelper.GetTokenInternal went into the case
if (ex.Message.IndexOf(" is expired") < 0 && ex.Message.IndexOf(" has expired") < 0)
but I suspect that a better solution would be to rework the logic of GetTokenInternal so that it treats a cache entry older than some cutoff (90 days?) as non-existent.
The text was updated successfully, but these errors were encountered:
I had an unhandled exception when calling
PersistentAuthHelper.GetToken(string id, string resource)
to log into an Azure subscription which I hadn't accessed in a very long time. Unfortunately I didn't document the details (or locate and back up the token cache) before trying a workaround, but the gist was thatBaseAuthHelper.GetTokenInternal
went into the caseARMClient/ARMClient.Authentication/AADAuthentication/BaseAuthHelper.cs
Line 318 in 3dc4ff9
which called
ARMClient/ARMClient.Authentication/AADAuthentication/BaseAuthHelper.cs
Line 442 in 3dc4ff9
and that threw an exception on receiving an HTTP 400 response because the refresh token was too old.
A workaround is to change
ARMClient/ARMClient.Authentication/AADAuthentication/BaseAuthHelper.cs
Line 257 in 3dc4ff9
to
but I suspect that a better solution would be to rework the logic of
GetTokenInternal
so that it treats a cache entry older than some cutoff (90 days?) as non-existent.The text was updated successfully, but these errors were encountered: