Getting 45002 error on oauth callback when user tries to connect their Google account

We’re using Nylas hosted auth solution and for a specific user we’re getting these error params on the callback:

error=oauth_failed&error_code=45002&error_description=Grant+creation+failed

Haven’t found more information about that in the api docs. Can you help us understand what is happening here?

Thanks!

Hello,

Error 45002 means: “Hosted OAuth failed due to rejection by provider or user refusing consent”.

This happens when:

  1. User denied consent - The user clicked “Deny” or closed the OAuth window

  2. Provider rejected the request - The email provider (Google/Microsoft/etc.) rejected the OAuth flow

Common causes:

  • User cancelled the authentication

  • Invalid/expired OAuth credentials in your connector settings

  • Misconfigured redirect URIs

  • Provider-side account restrictions (admin policies, suspended account)

To debug: Check the provider’s error in the full callback URL or your application logs, there’s usually a more specific provider_error that explains exactly why the provider rejected it.

Many thanks,
Samuel R.
Support Engineer, Nylas