Your authentication token is invalid

It tips me in Actions.
“Your authentication token is invalid. Please try logging in again.”

But i have logged in many times, pls help me to solve it.

Hi @grayguest, could you please confirm your Insync version by hovering on the 3 dots (upper right of the app)?

Please also send your logs.db and out.txt files to support@insynchq.com with the link to this post.

Thank you for your reply, and I have sent my out.txt and logs.db to support@insynchq.com.

Platform: Windows 10 Enterprise
The Insync Accout: grayguest@hotmail.com
The E-Mail Sender: grayguest@gmail.com
The E-Mail Title:
【Problem】authentication token is invalid

1 Like

Same issue. Win10 Pro, 21H2.
Insync v3.8.3.5.473

Hybrid domain joined, logs in my tenant show that I’m signing in successfully. I’m also not keen on sharing the logs as I’ve noticed that they contain the names of almost every file sync’d. Might I suggest that the devs break the logs up into separate task specific logs (auth/sync/filestore/etc) so that it’s a bit easier to swallow from a privacy perspective when someone has to reach out for support???

1 Like

@r3set I understand the concern! I will forward that request re: log files for your privacy.

Could you confirm if the account in question is part of a Google Workspace?

Thanks. Unfortunately, it is not a Google Workspace account, it is a OneDrive for Business account in my personal tenant.

1 Like

Hi @r3set,

To help us investigate this issue, please do the following once the issue pops up again:

  1. Collect the 1st set of your log files (logs.db, out.txt) after Insync is closed.
  2. Re-authenticate your account by clicking the (+) beside your account avatar as shown here.
  3. Collect the 2nd set of your log files after Insync is closed, when the authentication token error message pops up again.

Send sets 1 & 2 of your logs to support@insynchq.com. You can upload them to the cloud if they’re too big as an email attachment, then send us a shared link to download. Thank you!

Hi Mia,

Happy New Year and whatnot. As I mentioned, I wasn’t comfortable sharing the complete logs due to the privacy implications. So I took a moment to dig through logs.db myself and found:

Traceback (most recent call last):
File “idesksync\oauth2client.py”, line 293, in __refresh
File “idesknet\httpclient.py”, line 187, in request
idesknet.httpclient.HTTPResponseError: (<HTTPStatus.BAD_REQUEST: 400>, b’{“error”:“invalid_grant”,“error_description”:"AADSTS70043: The refresh token has expired or is invalid due to sign-in frequency checks by conditional access. The token was issued on 2022-10-09T21:17:45.3034737Z and the maximum allowed lifetime for this request is 5184000.\r\nTrace ID: 6ddd8b28-5deb-483f-a2e3-4f236f7e3801\r\nCorrelation ID: a1837cc3-2991-4905-97fe-961811ee1f5d\r\nTimestamp: 2022-12-12 20:53:14Z",“error_codes”:[70043],“timestamp”:“2022-12-12 20:53:14Z”,“trace_id”:“6ddd8b28-5deb-483f-a2e3-4f236f7e3801”,“correlation_id”:“a1837cc3-2991-4905-97fe-961811ee1f5d”,“suberror”:“token_expired”}’)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “idesksync\oauth2client.py”, line 231, in __refresher
File “idesksync\oauth2client.py”, line 309, in __refresh
idesksync.clouderrs.InvalidToken

So since MS provides a parsable error message that explicitly explains what’s wrong (and that will always appear in the same format Devs!!!), is it possible to just prompt users to re-auth with either a link to the MS KM or with a little note that says “Your org’s policy says that you have to interactively sign-in every $ValueFromErrorConvertedFromSeconds.”

Microsoft - Azure AD Authentication and authorization error codes

@r3set Thank you for posting this detailed information, @r3set.

We have an in-app prompt that tells users to sign in again when an authentication token has expired. We’ll check succeeding and previous reports from OneDrive users to see if they have a similar entry in their logs so we can determine how we can improve on that little note you suggested.

Thank you!

Interesting. To date, I’ve never gotten that prompt on either device that I experienced this issue on.

Now to see if anybody else is running into the issue where Insync turns into a paperweight and freezes when syncing a folder…