Prerequisites
- A Microsoft Entra ID application registered in your Azure tenant
- Azure OpenAI or Azure AI Foundry resource deployed
- An X.509 certificate (or OpenSSL to generate one)
Azure Configuration
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
Prepare a Certificate
You can use an existing certificate or generate a new self-signed certificate.
This creates:If using an existing certificate, ensure you have:
Generate a new certificate using OpenSSL
Generate a new certificate using OpenSSL
private-key.pem- Keep this secure, you’ll provide it to TrueFoundrycertificate.crt- Upload this to Azure
- The private key in PEM format
- The public certificate to upload to Azure
Upload Certificate to App Registration
In your app registration, navigate to Certificates & secrets > Certificates >
Upload certificate.Upload 
certificate.crt and note the Thumbprint value displayed after upload.
Assign RBAC Role to App Registration
Navigate to your Azure resource > Access control (IAM) > Add role assignment.
- Azure OpenAI
- Azure AI Foundry
Assign Cognitive Services OpenAI User role to your app registration.Learn more about Azure OpenAI RBAC

Role assignments may take a few minutes to propagate.
TrueFoundry Configuration
Add Provider Account with Certificate Authentication
Navigate to AI Gateway > Models and select your provider (Azure OpenAI or Azure AI Foundry).Click Add Account and select Certificate Authentication. Fill in the following:

| Field | Description |
|---|---|
| Tenant ID | Directory (tenant) ID from app registration overview |
| Client ID | Application (client) ID from app registration overview |
| Certificate | Contents of the private key in PEM format. You can also use a TrueFoundry Secret here. |
| Certificate Thumbprint | Thumbprint shown after uploading certificate to Azure |
For Azure AI Foundry, certificate authentication is configured at the model level,
not the account level.

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.