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
Cause: I have multiple processes using the access token to request data from OneDrive, one subshell(child process) renews the token every 30 minutes. However, once it executes and renews the token the parent or other processes cannot take the new token from a global (env) variable in shell scripts. Then the parent process still uses the abandoned token to request and it will get such error.
Solution:
when finding the API access returns this error with code InvalidAuthenticationToken, renew the token immediately and send the API request once more.
I finally canceled the child process for token renewal since it is not convenient to pass the renewed token back to its parent process. Instead, I refresh the token in parent since it uses the token quite frequently, and share the renewed token via a file for other processes which don't use it very often.
For this situation, from my understanding, the token is invalid not because its lifetime is explicitly expired, it is because we renew or get a new one during its lifetime at another contex (function/process etc. which is not able to share the access token to where it uses) but we don't use the renewed one to request. I guess only one valid access token is allowed to the same refresh token. Then the previous live token is abandoned and becomes stale and invalid, the new token replaces its availability.
It's is a little different from code 80049217 which is due to the access token has passed its lifetime from the time aspect, although both share the same literal reason code InvalidAuthenticationToken.
denven
changed the title
Found continuous error in log file: CompactToken validation failed with reason code: 80049228
CompactToken validation failed with reason code: 80049228
Jan 27, 2023
Bug details:
The text was updated successfully, but these errors were encountered: