Skip to content

Gemini Enterprise custom UI: three auth layers to build

Google's guide explains what a custom interface must handle once it calls the StreamAssist API directly.

Draftship Editorial3 min read

What Google published

On NOV. 20, 2026, Google published a developer guide on Gemini Enterprise custom UI auth. The post is aimed at companies that embed Gemini Enterprise in an internal portal, intranet or line-of-business app instead of using the built-in web app, and call the StreamAssist API from their own backend. The guide, by Neeraj Agrawal, a Forward Deployed Engineer at Google Cloud, sets out three authentication layers that move from Google's responsibility to the customer's once a custom interface is in place. Google's walkthrough of the three auth flows includes architecture diagrams and runnable code.

The three layers the built-in app hides

With the standard web app, employees sign in through Google Identity or Workforce Identity Federation, search results respect per-user access controls, and third-party login prompts appear in the chat interface. Calling StreamAssist directly removes that layer.

The first job is authenticating the caller. The guide gives three patterns: Google Identity, where the UI signs the employee in with Google Identity Services and passes the resulting bearer token to StreamAssist; Workforce Identity Federation, where an Entra ID or Okta token is exchanged at Google Security Token Service against the same Workforce Pool already connected to Gemini Enterprise; and Workload Identity Federation, which authenticates a machine rather than a person and suits shared bots and webhooks. Every principal needs the Discovery Engine User IAM role, and the two human patterns also need an active Gemini Enterprise user license in the Admin Console.

The second job is Federated Connectors. Connectors such as Google Drive, SharePoint Online, Jira, Box, ServiceNow and Confluence use 3-legged OAuth so results match what the employee can see. The backend lists connectors and checks the Keystore for a valid token, the UI opens a consent popup, the callback returns through Google's redirect page, and the refresh token is saved in the Keystore rather than the customer's database. After that, the connector's data store ID must be included in StreamAssist requests.

The third job is per-tool OAuth for custom ADK agents on Vertex AI Agent Engine. Attaching static OAuth at the root agent level blocks the whole agent before the first turn, and that design assumes the built-in UI. The guide's alternative wraps protected sub-agent tools in GcpAuthProvider, backed by the GCP Auth Manager Token Vault, and deploys with Agent Identity enabled so the consent popup appears only when a protected tool is called.

What changes for builders

The choice between user and workload identity is a product decision. A non-personalized bot over a shared knowledge base can use Workload Identity Federation, but anything that needs per-user document ACLs, user-specific connectors or restricted agents needs the user patterns. Custom domains add a configuration step: the redirect page sends the callback to the built-in app's origin by default, so a custom origin flag has to be enabled with the Gemini Enterprise team.

Limits and open questions

This is a guide, not a launch. The source gives no pricing or availability details. The published text cuts off mid-sentence in the agent section, so the remaining setup steps and the code are not visible. It also does not explain how to handle revocation or what the custom origin flag process involves beyond contacting the Gemini Enterprise team.

What this means for AI app builders

Internal assistants that reach into Drive, SharePoint or Jira inherit the same problem: the identity of the person asking has to reach every tool. Apps built on Draftship get built-in user sign-in, covered in managing login and registration, but that handles login to the app itself, not Gemini Enterprise federation or per-tool OAuth tokens.

Primary sources

This article was drafted with AI assistance from the primary sources listed below and checked automatically against them. An editor hasn't reviewed it yet.