Knowledge Base Article #321493
How do I deal with an Authentication Failure invalid_grant message from a Microsoft email account?
If you have an email account in Chaos Intellect that uses the OAuth 2.0 protocol to connect to your mail provider, Chaos Intellect is never given your actual account password. Instead when you setup the account in the program, Chaos Intellect was granted permission to access the email data.
If this permission was revoked on the mail provider side (which can be for many reasons other than you explicitly removing it - changing your password would be another way to remove it indirectly), you will need to re-connect the account in Chaos Intellect again to get a fresh new and valid "grant" to authenticate our connection is allowed.
You should open your default web browser and make sure you are looking at the web mail for the account you want Chaos Intellect to connect to. (This makes sure the web browser is using the right account when you add the account to Intellect and try to give it permission.
In Chaos Intellect go to the Mail view, then to the Accounts button on the toolbar where you can add and remove accounts.
- Make note of the email account nickname you chose when you setup the account originally. You might also want to check the signature tab to see if you had created a custom signature and if so, copy that information someplace that you can copy back to the replacement account settings a few steps from now.
- Remove the existing account
- Add a new account and give it the same email account nickname that you noted above.
- Choose your mail provider. Choices include "Microsoft 365 OAuth" and "Outlook.com OAuth".
- Enter your name, your organization (optional), your email account address and your Reply-to email address (usually the same email address again).
- Click Next.
- You'll be taken to your default web browser to authorize Chaos Intellect to access your email for this account if you have not already done so.
- Before clicking on the Accept button, make sure the email address at the top matches what you entered in Chaos Intellect in step 5! (For a Microsoft hosted account this is shown below the Microsoft logo but above the line that says "let this app access your info")
If it doesn't match, you will need to cancel and get logged into that account first with your mail provider's web mail then restart with step 3 again.
- If you click Accept and the authorization for Chaos Intellect is approved, you should get a message like "OAuth Authorization Successful" and "Looking Good" and you can return back to Chaos Intellect to finish the
process of adding the account (including the custom signature if you have one).
- If you have more than one mail account listed in Chaos Intellect and removing and adding back the account changed the order in which those mail accounts appear, you may need to update which mail account Chaos Intellect should use as your default (the one with the star) before closing the account window.
By giving Chaos Intellect the same internal email account nickname for the account as it used before, it should be able to pick up where you left off instead of re-downloading everything from the server again.
By the way, the automatic settings use the mail provider's recommended IMAP protocol for incoming mail and the SMTP protocol for outgoing mail.
Keywords: oauth, invalid grant, authentication failure, office365, office, outlook, hotmail, msn, microsoft 365
Modified Date: 2/24/2025
WRT
Click here to return to the Tech Support search screen.