Skip to main content
env zero can write your deployment and audit logs as blobs in an Azure Blob Storage container. env zero authenticates with an OIDC token that Microsoft Entra ID exchanges for an access token, so you don’t store an Azure secret in env zero.

Prerequisites

Creating, updating, or deleting a log forwarding integration requires the Edit Organization Settings permission.
  • 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.
If you deploy with a self-hosted agent, the agent uploads the deployment logs, so it must run a version later than v5.6.3. Audit logs do not depend on the agent.
If the storage account’s Public network access is Enabled from selected virtual networks and IP addresses, add env zero’s IP addresses. With a self-hosted agent, also add the agent’s outbound IP addresses. If the agent runs in Azure in the same region as the storage account, IP rules have no effect on its requests: add a virtual network rule for the agent’s subnet, or a private endpoint, instead.

Grant the app access to the container

  1. In the Azure portal, open the storage account, select Containers, and open the container.
  2. Select Access control (IAM) > Add > Add role assignment.
  3. Select the Storage Blob Data Contributor role.
  4. Under Members, select the app registration, then click Review + assign.
env zero only creates blobs. It never reads, lists, or deletes them. A new role assignment can take a few minutes to take effect.

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 under env0-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.