Ejento AI
GuidesQuickstart
RecipesREST APIsRelease NotesFAQs
GuidesQuickstart
RecipesREST APIsRelease NotesFAQs
Ejento AI
  1. Setup After Deployment
  • How to Setup Ejento on Azure
  • Prerequisites
  • Deployment on Azure
  • Setup After Deployment
    • Custom Domain Set Up
    • Microsoft SSO Authentication
    • Okta SSO Authentication
    • SharePoint Connection Set Up
    • Developer API Set Up
    • Azure AI Search Indexer
    • Container Session Pool Set Up
    • Workload Identity Federation — Azure to GCP Vertex AI
  • MCP Servers
    • Slack
    • Jira
    • Azure
    • Snowflake
    • Azure Cosmos DB
    • Microsoft OAuth MCPs
  • Overview
    • Azure Resources
  1. Setup After Deployment

Workload Identity Federation — Azure to GCP Vertex AI

Complete Setup Guide: Keyless Authentication for AI Models on Vertex AI
This guide covers every step required to configure an Azure App Service to call Google Vertex AI (your AI models) using Workload Identity Federation — no stored secrets, no service account keys, keyless machine-to-machine trust.

Overview#

Workload Identity Federation (WIF) allows a workload running on Azure (App Service, VM, Container App) to prove its identity to Google Cloud Platform without a long-lived service account key. The flow is:
Azure App Service Managed Identity issues a short-lived Azure AD JWT.
That JWT is exchanged at the GCP Security Token Service (STS) for a federated token.
The federated token is used to impersonate a GCP Service Account.
The service account token is used to call Vertex AI (your model endpoints).
Note: You will need: GCP project owner / editor access, and Azure subscription access to the App Service(s). Steps are split into GCP Admin and Azure Client.

Part 1 — GCP Setup (Admin)#

1.1 Enable Required GCP APIs#

In the GCP Console for your project, enable the following APIs. All are required — missing any one will cause authentication or model-call failures.
Required: Agent Platform API
Required: Security Token Service (STS) API — enables the WIF token exchange
Required: IAM Credentials API (Service Account impersonation)
Navigation path:
GCP Console → APIs & Services → Library → search each name → Enable
1.png
2.png
3.png

1.2 Create the Workload Identity Pool#

A Workload Identity Pool is the container that holds trust relationships with external identity providers (in this case Azure AD).
Navigation:
GCP Console → IAM & Admin → Workload Identity Federation → Create Pool
4.png
Fill in the pool form:
FieldValue
Namee.g. wif-azure-prod
Pool IDAutomatically derived from name (lowercase, hyphens). Note this down — used later.
DescriptionOptional. e.g. "Azure App Service WIF for [your project]"
EnabledChecked (ON)
5.png
Click Continue — do NOT click Done yet; you will add the provider next.

1.3 Add the Azure OIDC Provider#

The provider tells GCP to trust JWTs issued by Azure Active Directory. After clicking Continue from the pool form, the Add a Provider screen appears.
Provider settings:
FieldValue
Select a providerOpenID Connect (OIDC)
Provider Namee.g. Azure Provider (display name only)
Provider IDe.g. azure-provider (URL-safe, lowercase — note this down)
Issuer (URL)https://login.microsoftonline.com/{TENANT_ID}/v2.0
Allowed Audiencesfb60f99c-7a34-4190-8149-302f77469936
6.png

1.3a Find Your Tenant ID#

In any Azure Portal session:
1.
From the Search page, find Entra ID.
2.
Copy the Tenant ID from the Overview page.
3.
Paste it into the Issuer URL replacing {TENANT_ID}.
Example Issuer URL:
https://login.microsoftonline.com/<tenant_id>/v2.0
7.png
Warning: The issuer URL must end in /v2.0. Azure App Service Managed Identity issues v2.0 tokens. Without /v2.0 the token exchange will fail with invalid_grant: issuer mismatch.

1.3b Find the Allowed Audience GUID#

You must use the GUID form in the GCP provider Allowed Audiences field.
Enter this Microsoft-provided GUID:
fb60f99c-7a34-4190-8149-302f77469936
8.png

1.3c Configure Attribute Mapping#

On the same provider form, scroll to Attribute Mapping. These mappings copy claims from the Azure JWT into Google's assertion attributes.
google.subject = assertion.sub
The google.subject mapping is mandatory — it becomes the value used in principal-set bindings (the Object ID / sub claim from Azure).
9.png
Click Save to finish creating the pool and provider.

1.4 Create or Identify the GCP Service Account#

Vertex AI calls are made by impersonating a GCP Service Account. You can create a dedicated one or reuse an existing account.
Create a new Service Account
Navigation:
GCP Console → IAM & Admin → Service Accounts → + Create Service Account
10.png
FieldValue
Service Account Namee.g. ejento-service-account
Service Account IDAuto-filled. Note the full email — format: {id}@{project}.iam.gserviceaccount.com
DescriptionOptional. e.g. "Used by ejento for Vertex AI calls via WIF"
11.png

1.5 Grant Vertex AI Role to the Service Account#

The service account must have permission to call Vertex AI model endpoints.
Navigation:
GCP Console → IAM & Admin → IAM → + Grant Access
Fill in:
New principals: paste the service account email
Role: Vertex AI User (roles/aiplatform.user)
Click Save.
12.png
Note: Vertex AI User is the minimum required role. Do not grant broader roles (e.g. Editor) unless your use case requires it.

1.6 Grant Workload Identity User to the Service Account#

This binding allows the Azure managed identity to impersonate the GCP Service Account. There are two approaches:

Option A — Per App Service (Recommended, Most Secure)#

After the customer shares their App Service's Object (Principal) ID, create a specific binding:
Navigation:
IAM & Admin → Service Accounts → select your Service Account → Permissions → Grant Access
13.png
New principal (copy exactly — replace placeholders):
principalSet://iam.googleapis.com/projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}/*
image (2).png
Role: Workload Identity User (roles/iam.workloadIdentityUser)
15.png

Option B — Wildcard Binding (broader access)#

Alternatively, a wildcard binding can be used to allow any identity within the pool to impersonate the service account, rather than scoping to a single Object ID:
principalSet://iam.googleapis.com/projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}/*
Role: Workload Identity User (roles/iam.workloadIdentityUser)
Note: This option is broader than Option A since it trusts every identity in the pool, not just one specific App Service. Use Option A when possible for tighter scoping.

3.2 Placeholder Reference Table#

Value / PlaceholderWhere to Find / ExampleNotes
{PROJECT_NUMBER}GCP Console → Home → Project info → Project numberNumeric, not the Project ID string
{POOL_ID}IAM & Admin → Workload Identity Federation → select pool → copy Pool ID
e.g. azure-pool-dev
Exact ID, not display name
{PROVIDER_ID}Same pool page → Providers tab → Provider ID column
e.g. ejento-azure
Exact ID, not display name
{SERVICE_ACCOUNT_EMAIL}IAM & Admin → Service Accounts → email columnFull email including @project.iam.gserviceaccount.com
Previous
Container Session Pool Set Up
Next
MCP Servers