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

Client secrets tab in Certificates & secrets showing a created secret

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

Add role assignment for app registration

Role assignments may take a few minutes to propagate.

TrueFoundry Configuration

1

Add Model Account with Client Secret Authentication

Go to AI Gateway > Models, click Add Model > To New Provider Account and select your provider: Microsoft Foundry (New) for new accounts, or Azure OpenAI (Legacy) / Azure AI Foundry (Legacy) for existing setups.Under Authentication Data, select Entra client secret based auth. Fill in the following:
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

Azure OpenAI account form with Entra client secret based auth selected

2

Add Models and Test

Add your models as described in the guide for the provider you selected: Microsoft Foundry for new accounts, or the legacy Azure OpenAI and Azure AI Foundry guides.Test the connection using the Playground to verify authentication works.