AZURE_CLIENT_SECRET or client certificate stored anywhere.
Follow the OIDC prerequisites, then go to the OIDC page for your environment and copy the issuer URL and subject.
Configure Azure
- Register an app in Microsoft Entra ID, or reuse one, and grant it access to the Azure resources your task uses (for the example below, the Storage Blob Data Reader role on a storage account).
-
In the app registration, open Certificates & secrets, select the Federated credentials tab, select Add credential, and choose the Other issuer scenario. Fill in the federated identity credential:
- Copy the app’s Application (client) ID and Directory (tenant) ID from its Overview page.
Use the credential in your task
ClientAssertionCredential from @azure/identity calls your function whenever it needs a new Entra token. Return a fresh Trigger.dev OIDC token from it:
/trigger/read-from-azure.ts
AZURE_TENANT_ID and AZURE_CLIENT_ID if you prefer.
Create the credential inside run so one run’s tokens are never reused by another. Redeploy and start a new run on that deployment.
Remove the old credential
Once runs in every deployed environment authenticate this way, deleteAZURE_CLIENT_SECRET, AZURE_CLIENT_CERTIFICATE_PATH, and AZURE_CLIENT_CERTIFICATE_PASSWORD from those environments on the Environment Variables page, then delete the secret or certificate from the app registration.
Local Development runs can’t mint OIDC tokens. Use your own Azure sign-in there, such as DefaultAzureCredential with the Azure CLI, when ctx.environment.type === "DEVELOPMENT".
