G Suite

How to fix “Error: admin_policy_enforced” on G Suite

I’m writing this post for fellow Airmail users who have recently started noticing that their G Suite accounts have been logged out. When trying to refresh the token, you log into your G Suite account only to be met with the message, Error: admin_policy_enforced. How do you fix it?

This is caused by a recent change in G Suite, but Google doesn’t make it easy for us to find how to fix it. As you can see above, it asks to contact the administrator, which is weird that it can’t tell I was the administrator of that G Suite account.

I’ve found the solution after fiddling with G Suite’s admin console. I’m documenting here in case anyone else who started using Airmail after reading my glorious Airmail review and is now facing the same issue when logging into G Suite email accounts.

Steps to fix the admin_policy_enforced error

  • Log into admin.google.com with your G Suite account.
  • Click “Security” -> “API Permissions” -> “Installed Apps”
  • You should now see the list of your installed apps. I only have Airmail on that list. Click the three-dots on the far right and click “Trust.”
  • You will see Airmail, or any other app that you gave access to, under the “Trusted” tab.

Reconnect Airmail with G Suite

At this point, you can just open Airmail Preferences, click the gear icon next to the email address you’re having trouble with, and click Refresh token. It will open up the login page for Google on your default browser. Then you will be able to allow Airmail access to your account without any trouble.

I have multiple G Suite accounts connected to my Airmail and I noticed only one of them faced the Error: admin_policy_enforced problem. So I’m not sure why Google selectively made changes to the API permission for G Suite accounts.

I’m also not sure why Google wouldn’t recognize that I’m trying to log into the administrator account and give me the information to fix the API permission error right on the login page. It would have made solving the permission error a lot easier.

Then again, I’ve always had trouble locating troubleshooting information on Google support pages. They have tons of them, which is good, but navigating them is no easier task than Jack Sparrow looking for the Fountain of Youth.

If you were having trouble, I hope the above steps fixed it for you.

Subscribe to Letter, a twice-monthly email newsletter

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: