Current limitation stored directly in retool source code:
REQ.OAUTH_RESOURCE is not brokered in embed yet: interactive resource re-auth needs the parent's resource list, which the shell doesn't have.
I have a retool app embedding using the auth flow - and all works fine, except that i am unable to authenticate an external resource for MS GraphQL without first manually logging into retool (sort of defeating the embedded auth flow)
So the question is precicely this:
Can you enable an authenticated embed-redirect host for an app that brokers RR_OAUTH_RESOURCE, or provide a supported per-user OAuth flow for an session?
When embedding a New App using the Retool Embed auth flow, a per-user OAuth resource (MS Graph) can't be authenticated from within the embedded session unless the viewer first manually logs into Retool directly, which defeats the point of the embedded auth flow; is an embed-brokered per-user OAuth flow supported?
AI Response
This behavior is expected rather than a bug: the OAuth 2.0 spec advises against running interactive OAuth inside embedded browsers/iframes due to clickjacking concerns, so an embedded app generally cannot broker the interactive per-user re-auth on its own. The supported pattern is to have the parent application complete authentication against the shared identity provider before rendering the embedded Retool app, then have the embedded app consume that session instead of triggering its own OAuth popup. From there, reference the session via the %USER_OAUTH2_ACCESS_TOKEN% / %USER_OAUTH2_ID_TOKEN% magic variables (or current_user.metadata) when configuring the resource query. Where the IdP permits, disabling clickjacking/iframe protection on the IdP side can also allow the in-embed flow to complete.
Sources
Authed resources in embedded app
A solved thread on authed resources in embedded apps where Retool staff explain the parent-authenticates-first pattern and using the %USER_OAUTH2_ACCESS_TOKEN%/%USER_OAUTH2_ID_TOKEN% magic variables so the embed consumes an existing session instead of brokering interactive OAuth. Embed Apps + OAuth
The canonical, solved 'Embed Apps + OAuth' thread containing Retool's clarification that interactive OAuth inside embedded browsers is a deliberate OAuth 2.0 spec limitation (clickjacking protection), not a Retool bug.
The Community Team is testing out a new automation. Let us know if it's helpful (or not) by leaving a , , or . Or by marking this post as the "Solution"! Let us know if you have any feedback here.