Unofficial archive. This is a read-only, community-run archive of the Apple Support Community. It is not affiliated with or endorsed by Apple Inc.

Auth 2.0 Error 400 on Mail account

I try to add my account but I got this message


Authorisation Error
Error 400: invalid_request

You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy for keeping apps secure.

You can let the app developer know that this app doesn't comply with one or more Google validation rules.
Learn more
Request Details
The content in this section has been provided by the app developer. This content has not been reviewed or verified by Google.
If you’re the app developer, make sure that these request details comply with Google policies.
redirect_uri: urn:ietf:wg:oauth:2.0:oob



What's wrong with Apple and Google? Google asks to contact the developer, yes Apple...


It's so frustrating...

53 replies

SOLUTION


In google, goto "Manage your Google account"...


On the left menu, select "security"...


Scroll to "2-Step Verification" (Mine was on already)...


Scroll to the very bottom of the "2-Step verification" page and select "App passwords"...


Select app menu, select "Mail" in the "Select Device menu, select "Mac"...


Click the "Generate" button and copy the password in the yellow box...


Open the mail app...


Archive your mail for the account you are fixing (if you need to, most people wont)...


Open system preferences from the Apple Menu...


Select "Internet Accounts"...


Delete the broken Gmail account here by clicking on it and hitting the - at the bottom of the window and close that window...


Go back to the mail app...


In the "Mail" menu, select "preferences" and add a new account with the + at the bottom of the accounts list making sure to select "other mail account" as the account provider and click "continue"...


enter the name for the account, enter the gmail email address, and paste the password you copied from the yellow box as the password.


TADA!

I also had the same issue on High Sierra. Do the following:

go to your google account settings, security tab and then app passwords. Select mail app on Mac device. Write down the generated password. Then on mail, click on add account, other mail account and type your email and the password you created in the previous step. That’s it 😉

FIX


Go in to yur google account

Select security

Go to App passwords

Select ap ( mail )

Select device ( mac )

Generate code

Copy code


Then go back to system pref and internet accounts

Add " OTHER ACCOUNT

put details in with copied password


BINGO !!!!



I was able to fix this ...


The trick is to go to the Security section of your account manager.

Then ... click on "2-Step Verification"

Then ... Scroll all the way down to App Passwords

Then ... follow the prompts to Generate a 16-digit key from Google.

Copy that key.


Then ... open Mail.

Click on Add Account

DO NOT click on Goggle

Click on Other Mail Account

Then ... type in your Gmail account

DO NOT type your usual gmail password

Instead ... Copy in the 16-digit key you got from google.


Mail should be working fine now.





Bob, after having deleted your Google account (macOS System Preferences, Internet Accounts), add a new account by selecting "Add Other Account…". Then you can configure your Gmail account by entering your gmail email address and the app password that you created by following the solution described in this thread.


Google seems to have made a change in being more struct regarding security. Apple Mail on High Sierra is pretty old and no longer considered as "secure" by Google. Therefore Google started to block logging into your email account with your regular password.


The workaround is, that you generate a password only to be used for the mail application and nowhere else. Also not storing it on your computer! Whole point is to no longer having to use your regular password on for Apple Mail as it potentially can get hacked. You still can use your regular Gmail password from your phone or through Web. Just the now "insecure" Apple Mail app should use this separate app password to isolate potential damage.


The workaround works, the thoughest part is finding the app password generator in Google's kitchen-sink account.


Your Mac and thus email client (Mail) is probably too old to comply with Google's security policy so you are unable to add gmail account to Mail with default procedure (using Google authorisation site where the error message appears). You need log in to your google account, enable 2-step verification if you haven't done that yet, and generate an app password (for Mail). Then in Mail you choose "Other account" (not Google) and use the generated password there instead your standard Google password.

Hi YvonnePhoto


I'm not affiliated with Apple nor with Google, but this authentication issue is a common issue in the IT industry and not at all specific to Apple hard- and software.


Please follow the instructions from jrginnyc - this is the proper approach to implement a work around. It is that Google has increased security measures and no longer allows the use of the standard Gmail password for all software no being up-to-date security wise. For instance my HP printer imposed the same issue as it is using my Gmail account to deliver me the scans per Email.


All Google is asking is, that you specify a separate - so called app password - that you only use for a dedicated purpose, in this scenario Apple Mail on our desktop or laptop. Then you configure an "Other account" (not Google) but provision your gmail address along with the application password and you are good to go. I just had to do it on my wife's PowerBook which still runs High Sierra.


Alternatively you can also consider using Mozilla Thunderbird on your Mac. You only have the issue on your Mac as Apple tries to simplify the setup process for Gmail and this is a built-in feature of macOS which is no longer supported with updates from Apple. If you still run Windows XP or Windows 7 wyou would experience similar issues.


Hope that helped providing some background to the topic. The process described above will be working 100%. Let me know if you struggle and need further support. You definitely can continue using Apple Mail on your legacy Apple hardware for Gmail.

This works! Once you've enabled 2 factor, then click on App passwords, dont click on 'google' check box when adding the account, click on other and in the password section, dont type your gmail password, enter the 'generated app password' and it adds it as normal.

I had this because I signed in on a windows laptop with my google account and it all went to crap on my mac.

This fixes it.

Thanks for the help!

I had this exact issue on High Sierra.

What worked for me was step two here:

https://technclub.com/guides/fix-oauth-2-0-error-400-apple-mail-mac/


Sign in to google on a browser (I used Safari as suggested by the above link).

Go to 'Manage Your Google Account'. Then 'Security' from the sidebar.

Under 'How you Sign In To Google' go to '2-Step Verification'.

Down the bottom of this page is 'App Passwords' where you can generate a one-time password. Do this and copy it.

Back to Mac Mail and instead of selecting Google under 'Accounts', select 'Other Mail Account'.

Then enter your gmail email address and the one-time password.


This worked for me so I hope it does for you too.


Cheers.


Finally managed to get round this today.


Goto the security option at https://myaccount.google.com


• Enable 2 factor authentication

• Once enabled there is a "App passwords" option on the 2FA page (https://myaccount.google.com/u/8/apppasswords)

• Create an app password for Apple Mail. It will then give you a 16 digit code to use in Apple Mail. (Note that if you copy and paste it will include the spaces between the blocks of 4 digits)

• Use this password in the IMAP/SMTP settings


After that, login to Gmail and goto the pop/imap settings


https://mail.google.com/mail/u/8/#settings/fwdandpop


• Enable IMAP here


Return to Apple Mail


• Sync you email and it should all work fine.


One missing element of the steps outlined in the link is that when you create the App Password, copy it and then go to your Apple Mail app, add account and go to "Other Mail Account" (do not try to add Google Account again or you will continue to get the same message), type in your Google account address and when it asks for a password paste in the App Password that was generated by Google and it will set it up.

edmeyers wrote:

where do i find app passwords.......i'm not seeing it unfortunately but it could be old age


Google Account Help – Sign in with app passwords


You log in to the Google site, and ask Google to create the app password. Then you use it with Mail on the Mac. Note that Google will not generate an app password for you unless you turn on 2-Step Verification.

The Animaster has the solution. Well it's not the easiest thing I've ever done but IT WORKS! I copied it just in case I can't get back to it so here it is. The only down side is your gmail on macmail does't connect to the mac calendar. Here is the Animaster SOLUTION & IT WORKS. Don't let the 2 step verification scare you, it's just what it's called & you only do it once to get it to work. Here it is from the Animaster:

I FOUND THE SOLUTION. 


People have mentioned it here, but with incomplete steps. So here is how to get it done:


1.) KNOW why this is happening in the first place: it's coz Google says your old mac and old mac OS have insufficient security. With that said, you can only update an old mac for about 7-10 years. Then you're SOL. Keep that in mind. Lucky for us old mac users (I'm running a 2011 MBPro with ElCapitan) -- we are still able to add new GMAIL accounts with a workaround. 


2.) As mentioned here, open your GMAIL account preferences by signing into GMAIL by web browser and clicking on your avatar in the upper-right and selecting "Manage your Google Account". Then click on the "Security" tab on the left.


3.) Under "Signing in to Google" ENABLE 2-step verification. This alone will NOT fix it, but it WILL allow you use what Google calls "Less Secure Apps Access". If you notice in your account settings, Google automatically sets this to OFF -- essentially blocking access to any apps that Google dubs 'insufficient security'. Enabling 2-step verification will bring up a third line under "Signing in to Google" that says "App Passwords".


4.) Click on "App Passwords" and this will walk you through generating a password that you can use to manually add a GMAIL account with your old mac. 


5.) Select and copy the generated password, go into Apple Mail preferences and select "other" when adding the new email account. Type in your gmail email address, and use the password you copied earlier, in the password field. 


If this helps, PLEASE hit the kudos button to bring it to the top!


Reply Helpful (116)


I fixed this...


I went to google settings > security > 2-step verification > app passwords > type in imail and generate a passcode, copy the passcode. Then I went to iMail > add account > select "other mail account" > type in email address and the passcode that was generated with google. Hit enter and it should work.

After much wailing and gnashing of teeth this finally worked for me.


App Password is no longer under "Sign in to Google". Took some searching to find it. After setting up 2-Step Verification it's at "Security/How you sign in to Google/2-Step Verification"...scroll to bottom. But the idiot programmers may have moved it again by now.


Then I tried to open a new email account in Mail with the same email address and it wouldn't let me. Next I thought I would just delete the account and recreate it. I was informed by Mail that this would delete all the data in the account. So I backed up that account emails and then deleted it. Tried to set up a new Gmail account but got the same error message that started all this. So I set up an "Other" account, as suggested, using the same email address as the one deleted and the App Password. This worked. Then I had to wait for over 3000 emails to download. Now my inbox is full of stuff I had trashed. But at least it seems to be working again.


I will now start weaning myself off of all things "Google".

This worked for me:


I noticed that the popup to login into google, when trying to add a new account, was opening in Safari Private Browsing mode. I went digging in Safari's settings, and in the "Advanced" tab under privacy I turned off the "Use advanced tracking and fingerprinting protection" AND the "Allow privacy-preserving measurement of ad effectiveness" and BAM... I was finally able to get past the 400 error that Google was sending back and I was able to authenticate and add my Gmail account to my Internet Accounts.

I'm not sure if it is because I'm running High Sierra, but I did not have "App Passwords" as an option under the "Security" tab. So, while logged into my google account, I went to:


https://myaccount.google.com/apppasswords


and followed the prompts. Write the password down. Copy and paste did not work.


I then deleted the mailbox in the Mail app, and added the new one under type other with the gmail address and the new password. Everything repopulated with no hitches.

Thank you, The Animaster. It has resolved my problem and extended my Macbook's lifespan by a few years. I would like to add some details that could be useful:

  • For some reason, the "App Passwords" section did not appear on my "Security" page. I could only access it by searching for 'App Passwords' in the Google Account search field. If your Google account language is not set to English, you must search for the exact string used by Google in your language for this section (e.g., 'Mots de passe des applications' in French).

  • After creating the new password: In Apple Mail, as The Animaster mentioned, make sure to select 'Other' when adding the new email account (you'll need to manually enter all Gmail information). Choosing 'Google account' will result in the same error 'You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy for keeping apps secure'.


Good luck!


I did it yesterday on High Sierra and it works.

You need to delete (not just deactivate) the "original" Gmail account before adding it back with "other mail account" .

Then use the "app password" provided by Google and voilà.


I cannot remove this old account otherwise it would be removed from all devices including newer ones.

I don't think so. Your Google account won't be deleted or removed on other computers.


One more thing : I tried to do the same and another old family iMac stuck on Sierra (last authorized OS) and it didn't work counter to the High Sierra Mac. Still seeking for a solution for that one :(

I have had this problem adding a gmail account to Mail. If you go to google help and describe the problem they will suggest a 16 digit app password that they will generate. Then go to add accounts in Mail. Do not click on the google symbol click on other account which you see when you scroll down, fill in your google data (email address) and use the generated password. It worked!

I seem to have fixed my issue: I f 00004000 ound this page How to download and install macOS - Apple Support

and have managed to download and install a later version of OS (Catalina) manually which has allowed my Gmail accounts to link to Apple Mail again.


I'm sure they will fall down again soon as Apple say my machine doesn't support Catalina, but it will hopefully give me a few weeks to research a new machine, rather than a rush purchase.


My Word and Excel for Mac no longer work with the new OS, but they are as old as the machine (2013) and I'm being directed to use Microsoft 365, so I'll have to see if I can find a workaround for this now.

I first asked for Gmail in the 'App Password' dialog box

I still had the same problem.

Then, realized the Apple App is called Mail


I asked for an 'App Password' for Mail

and voila... it worked.


Yay!! and Thank you!!! my emails are downloading as I type this


Currently the only solution is to download the "mail for gmail" application from the appstore. This way you can use your gmail account even on old mac os.

In my case (old Macbook Pro, late 2011) I generate on google account separate password for app and then i the Mail add Other mail account. With regular pass for gmail won't work.

Animasters procedure worked for me on my MacBook Pro with High Sierra after figuring out two additional steps:

3a.) "app password" did not show up for me, but I could search it with the search bar on top which brought me to the page mentioned in 4.)

It didn't work right away, I got "password could not be verified" various times, until I had switched on "activities" in Google safety settings (not sure that bit was necessary, I changed it again after everything worked) and then clicked on the "check activity" button in the safety/confirmation email I got from google on my secondary email account regarding the creation of the app password. After that, the account was confirmed.

thx for the help!



from the link you kindly posted


Still can’t sign in
If you're using an app not made by Google and can't sign in, that
app's sign-in process might not be secure. Try updating to the latest
version of the app and look for the 'Sign in with Google' option that’s
available in many apps 00004000 . You can also consider switching to a more secure app. 


Basically switch to another app as Mail doesn't comply with Google



P. Phillips wrote:

https://support.google.com/mail/answer/185833?hl=en-GB

Fail to see from previous suppled link and again in above link the assertion in above Users reply

Go figure

Devil is in the details



This worked for me so much appreciated. I removed my Google account from 'Internet Accounts' first (as could not sign in) before adding it back under 'Add Other Account' as you say with the newly generated password from'App Passwords'. I am using High Sierra 10.13.6.

Search for “App Passwords” on top of the page and create one for mail.

It works! In Security options go to two step verification to find App passwords.

Hi Guys, I managed to solve everything!

I have Macbook Pro 2011, Hig Sierra.


My steps were as follows:

1) I left the old gmail account disabled which didn't work.

2) Thanks to the system indicated above I logged into my Google account and created a new password for MAC and Mail.

3) On the Mac, in the mail app I created a new account by choosing "other" and writing my email with a dot before the @ (example: [email protected])

4) At this point I verified that the new account was working properly.

5) I re-enabled the old GMAIL account which no longer worked and... as if by magic it started working again!

6) At this point I deleted the new account I had created thanks to the "others" function


The old GMAIL account works fine!!


[Edited by Moderator]


Thanks , It took me a bit to follow, in not a teksavvy kind , it works, so thanks again.

It would be useful to have step by step method provided.

Animaster's solution WORKS. Just follow step by step. I'm just OK on the computer but it worked great on my Mac.

Yup


The solution is in the comments - take a look at my previous post 👍.


A few others have also posted the workaround.

yes!

Thanks for all the support offered here. Am I supposed to remove my "not working" gmail account first?


Because when I add account ....it says it already exists.

Many thanks

this is happening on my brand new Mac Book pro which I bought yesterday - everything is updated. So how can it be because it is old or outdated?

Animaster, you are great. Fixed! Couldn’t see a kudos button, hope this helps and thanks for being there👍🫡

I don't have an old mac or an old os.

Trying to do this, but there's no "generate", but a "create". But when I do that it doesn't accept the password.

I followed what most of you suggested that worked, but when i add the account on Mail, i get the message: Unable to verify account name and password

THIS WORKED!!!

Did you turn them back on afterwards?

This worked for me!! Thanks so much!!! I was banging my head against the wall.

This works for the mail application, however you have to individually add calendars and contacts, everything has worked except for 'contacts'. What is the solution?

Thank you!

Thanks for this. I have been pulling my hair out for a couple of days trying to get this to work. Your solution worked perfectly.

I'm on a 2018 MPB 13" and this did not solve my problem.

Nope, that didn't work

same problem

After following the workaround instructions, I still get this:



Hola podrías decirme por favor cuál es tu técnica? porque no puedo abrir gmail en el mail de mac.

Muchas gracias.