Persistent "redirect_uri_mismatch" Error Creating Gmail Data Store in Gemini Enterprise

Hello,

I am trying to create a Gmail Data Store in Gemini Enterprise (formerly Vertex AI Search) but I am stuck in a loop with the 400: redirect_uri_mismatch error during the authentication step after clicking “Create”.

I have followed the documentation and community advice, but the error persists.

Here are the steps I have taken:

  1. Created a new OAuth 2.0 Client ID for a Web Application.

  2. Verified my OAuth Consent Screen is published and configured correctly.

  3. Received the redirect_uri_mismatch error.

  4. Identified the required redirect_uri from the error message’s details pane.

  5. Added the exact URI to my Client ID’s “Authorized redirect URIs” list.

  6. Set the “Authorized JavaScript origins” correctly.

  7. Waited over an hour, cleared my browser cache, and even deleted and manually re-typed the URI to ensure there were no hidden characters.

My Current Configuration:

  • URI from Error Message:
    https://vertexaisearch.cloud.google.com/oauth-redirect?flowName=GeneralOAuthFlow

  • URI added to “Authorized redirect URIs”:
    https://vertexaisearch.cloud.google.com/oauth-redirect?flowName=GeneralOAuthFlow

  • URI added to “Authorized JavaScript origins”:
    https://console.cloud.google.com

Despite the redirect_uri in my request exactly matching the authorized URI in my Client ID settings, the error will not go away. I do not have access to a direct enterprise support plan.

Is this a known bug, or is there another project-level setting I might be missing that could cause this behavior?

Thank you for any help you can provide.

I solved this, it was by adding a few API connections. I wasn’t able to see the AI suggested forums that were similar until my account was unblocked. thank you.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.