Azure AI Foundry
Avant exchanges the workspace’s assertion with Entra ID for an access token, using a federated credential on your app registration or managed identity. No client secret exists. Read How provider setup works first.
What you need
Section titled “What you need”- An Azure AI Foundry resource. Its endpoint looks like
https://<name>.services.ai.azure.com. - An Entra app registration (or a user-assigned managed identity) with a service principal.
- A deployment for every model you want to use, named exactly after the model id (for example
claude-sonnet-5). Avant sends the model id as the deployment name.
Commands
Section titled “Commands”CLIENT_ID="<application-client-id>"BINDING_SUBJECT="avant:binding:..."
az ad sp show --id "$CLIENT_ID" >/dev/null 2>&1 || az ad sp create --id "$CLIENT_ID"
az ad app federated-credential create --id "$CLIENT_ID" --parameters '{ "name": "avant-byoc", "issuer": "https://identity.avant.codes", "subject": "'"$BINDING_SUBJECT"'", "audiences": ["api://AzureADTokenExchange"]}'
az role assignment create --assignee "$CLIENT_ID" \ --role "Cognitive Services User" --scope <foundry-resource-id>az ad app createmakes an app without a service principal. Entra won’t issue a token for it (AADSTS7000229) and won’t accept a role assignment, so the first line creates one if it’s missing.- Never create a client secret. The federated credential replaces it.
With a user-assigned managed identity, skip the first two commands and run:
az identity federated-credential create --name avant-byoc \ --identity-name <identity> --resource-group <rg> \ --issuer https://identity.avant.codes --subject "$BINDING_SUBJECT" \ --audiences api://AzureADTokenExchangeCreate the workspace
Section titled “Create the workspace”| Field | Value |
|---|---|
| Foundry resource endpoint | https://<name>.services.ai.azure.com |
| Azure region | The resource’s region, such as swedencentral |
| Entra tenant ID | Your tenant’s UUID |
| Entra application (client) ID | The client id, not the object id |
avant workspace create --name foundry --mode byoc-azure \ --endpoint https://my-foundry.services.ai.azure.com --location swedencentral \ --tenant-id <tenant-uuid> --client-id <client-uuid>avant workspace verify foundryVerify gets an Entra token and sends one request to the workspace’s default model, so that deployment has to exist.
Region
Section titled “Region”Foundry has no cross-region profiles. Set the policy’s Inference location to the workspace’s region.
Models
Section titled “Models”Claude models use the Messages API. GPT and other models use Chat Completions, and Responses where the table says so.
| Model | API | Locations | Harnesses |
|---|---|---|---|
claude-sonnet-5 | Messages | Any | Claude Code, OpenCode, Pi, Oh My Pi |
claude-sonnet-5-5 (default) | Messages | Any | Claude Code, OpenCode, Pi, Oh My Pi |
claude-haiku-5-5 | Messages | Any | Claude Code, OpenCode, Pi, Oh My Pi |
gpt-6.1-sol | Chat Completions, Responses | Any | Codex, OpenCode, Pi, Oh My Pi |
Revoke
Section titled “Revoke”Delete the federated credential or the role assignment.