Prerequisites
- A storage account in the Azure public cloud, with a container for the logs. env zero uploads to
https://<storage account>.blob.core.windows.net, so Azure Government and Azure China are not supported. - A Microsoft Entra ID app registration with a federated credential for env zero. If you don’t have one, create an app registration with a federated credential. If you already deploy to Azure with OIDC, you can reuse that app: the subject identifier is the same for your whole organization.
Grant the app access to the container
- In the Azure portal, open the storage account, select Containers, and open the container.
- Select Access control (IAM) > Add > Add role assignment.
- Select the Storage Blob Data Contributor role.
- Under Members, select the app registration, then click Review + assign.
Configure the integration
1
Open the integration
In your organization settings, open Integrations and click Azure Storage.
2
Enter the storage and app details
3
Match the federated credential
JWT OIDC Sub shows your organization’s subject identifier. It must match the subject of the federated credential.If the federated credential’s audience is
api://AzureADTokenExchange (recommended), check Use v2 OIDC token. If it is https://prod.env0.com, leave it unchecked. Audience (aud) shows the audience env zero sends.4
Choose the log types
Check Audit Log Forwarding, Deployment Logs Forwarding, or both, and click Integrate.
Configure with environment variables
To forward the deployment logs of some environments only, set these environment variables in any scope instead of configuring the integration. Audit logs need the integration.Where the logs land
Each upload creates a new blob:<logType> is env0-deployments or env0-audits. Without a blob path, the name starts at <logType>. Each line of a blob is one log entry, as a JSON object.
During a deployment, env zero uploads the logs every 10 seconds, or sooner when 2 MB of logs are waiting. env zero sends audit events in batches, every 5 minutes or every 1,000 events, so an audit event can take about 5 minutes to reach the container.
Check that logs arrive
Run a deployment, then look in the container for new blobs underenv0-deployments/, or under <blobPath>/env0-deployments/ if you set a blob path.
If an upload fails, the Azure Storage card on the Integrations page shows Integration stopped. Hover over it to see the time and error of the last failed delivery for each log type. The warning clears after the next successful delivery, or when you save the integration.