Skip to main content
This guide explains how to configure client secret based authentication using Microsoft Entra ID for Azure OpenAI and Azure AI Foundry models in TrueFoundry’s AI Gateway. Client secret authentication is also supported for Azure AI Foundry-based guardrails — Azure PII, Azure Content Safety, and Azure Prompt Shield. If you prefer certificate-based authentication instead, see Azure Entra ID Certificate Based Authentication.

Prerequisites

Azure Configuration

1

Get Application Details from Entra ID

Navigate to Azure Portal > Microsoft Entra ID > App registrations and select your application.From the Overview page, note the following values:
  • Application (client) ID
  • Directory (tenant) ID
2

Create a Client Secret

In your app registration, navigate to Certificates & secrets > Client secrets > New client secret.Provide a Description and choose an Expires duration, then click Add.
Copy the secret Value immediately after creation — Azure only displays it once. Store it in a secure location; you will provide it to TrueFoundry in the next section.
Azure app registration Certificates and secrets page with a client secret created under the Client secrets tab
3

Assign RBAC Role to App Registration

Navigate to your Azure resource > Access control (IAM) > Add role assignment.
Assign Cognitive Services OpenAI User role to your app registration.Learn more about Azure OpenAI RBAC
Access control IAM page showing role assignment
Role assignments may take a few minutes to propagate.

TrueFoundry Configuration

1

Add Provider Account with Client Secret Authentication

Navigate to AI Gateway > Models and select your provider (Azure OpenAI or Azure AI Foundry).Click Add Account and select Azure Entra client secret based auth. Fill in the following:
FieldDescription
Tenant IDDirectory (tenant) ID from app registration overview
Client IDApplication (client) ID from app registration overview. You can also use a TrueFoundry Secret here.
Client SecretThe client secret Value you copied from Azure. You can also use a TrueFoundry Secret here.
For Azure AI Foundry, client secret authentication is configured at the model level, not the account level.
TrueFoundry Azure OpenAI account form with client secret authentication fields
2

Add Models and Test

Add your models as described in the Azure OpenAI or Azure AI Foundry documentation.Test the connection using the Playground to verify authentication works.