Issue:

When clicking “connect” in assistant response it redirect to the particular application to complete the authentication but receives redirect_uri_mismatch or Access blocked error.

Error:

Resolution: As the error suggests seems like the redirect url is not correctly setup. Might have not configured the correct verify_code URI in the allowed list of redirects for the OAuth app. Below redirect url should be added in allowed URI for redirects as this endpoint exchanges the auth code for an access token.

https://your-glean-domain-name-be.glean.com/tools/oauth/verify_code/your-action-unique-identifier-name

For example: https://acmeco-be.glean.com/tools/oauth/verify_code/CreateGoogleDoc

Note: “your-action-unique-identifier-name” is case sensitive.

You can find the your-action-unique-identifier-name from actions setup as shown in below screenshot.