> ## Documentation Index
> Fetch the complete documentation index at: https://docs.traversal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure

> Give Traversal read-only visibility into your Azure environment: resource configuration, change history, and Azure Monitor logs and metrics.

Connecting Azure lets Traversal's agent inspect your Azure environment during investigations: what's configured and running right now, what changed recently, whether Azure itself is having a problem, and your Azure Monitor logs and metrics. Access is read-only. You grant the Reader and Log Analytics Reader roles, so Traversal can't create, modify, or delete anything in your Azure environment.

Azure Resource Manager (resource inventory, change history, access metadata) and Azure Monitor (logs and metrics) are one integration. You connect it once.

[Azure DevOps](https://docs.traversal.com/integrations/azure-devops.md) (source control, pipelines) is a separate integration. Connect it independently if you use it.

> [!NOTE]
>
> This integration covers Azure Commercial Cloud. Azure Government and other sovereign or national clouds aren't supported.

## What Traversal reads

* **Resource inventory and configuration**: via Azure Resource Graph
* **Change history**: via the Activity Log, scoped to your subscriptions
* **Resource and Service Health**: whether Azure itself is reporting a problem
* **Access and identity metadata**: role assignments (metadata only, no secret values)
* **Azure Monitor Logs**: Log Analytics workspace queries (KQL)
* **Azure Monitor Metrics**: platform and custom metrics

## How it works

Traversal authenticates to your Azure tenant using a short-lived, secretless credential (Microsoft Entra Workload Identity Federation). Neither side shares or stores a password, API key, or secret.

You create and own the identity Traversal authenticates as, inside your own tenant. It is a user-assigned managed identity or an app registration, trusted to a specific Traversal Kubernetes cluster through a federated credential, and granted the roles below on the subscriptions you choose.

Traversal doesn't register or own anything in your tenant. You give Traversal the identity's **Client ID** and your tenant ID.

Each API call uses a token that expires within minutes and is re-issued for each request.

You connect at the **tenant** level. Traversal discovers each subscription your identity can see, so you don't need to list subscriptions individually.

## Required roles

Traversal needs two roles:

| Role | Unlocks |
| - | - |
| **Reader** | Resource inventory, configuration, change history, Resource/Service Health, access/identity metadata, and Azure Monitor Metrics. |
| **Log Analytics Reader** | Querying the *contents* of Log Analytics workspaces. Without it, Traversal can see that a workspace exists but not what's in it. |

Traversal doesn't request Contributor, data-plane, or Cost Management Reader access.

> [!NOTE]
>
> A Log Analytics workspace lives in its own subscription, separate from the subscriptions whose resources send logs into it (common if you centralize logging into a shared subscription). Grant **Log Analytics Reader** on the subscription that hosts the workspace itself. Granting it only on the subscriptions that hold the resources you care about doesn't give Traversal access to the workspace's contents, and Traversal reports "no logs found" for resources that do have logs.

## Setup

The Bicep template below is the fastest path. To set it up by hand, or to use an app registration instead of a managed identity, skip to [Manual setup](#manual-setup).

**1. Download and deploy the Bicep template**

In Traversal, go to **Integrations**, select Azure, and download the Bicep template. It's pre-filled with Traversal's cluster OIDC issuer, so you only need to supply your own values when deploying:

```bash theme={null}
az deployment sub create --location <location> \
  --template-file traversal-azure-managed-identity.json \
  --parameters resourceGroupName=<your-resource-group> \
               roleAssignmentScopes='["<subscription-id>"]'
```

This creates a managed identity, federates it to trust Traversal's cluster, and grants it Reader and Log Analytics Reader on the subscription(s) you listed. Repeat the deploy, or pass more subscription IDs in `roleAssignmentScopes`, for each subscription you want visible. Include the subscription that hosts your Log Analytics workspaces (see the note under [Required roles](#required-roles)).

**2. Add the integration in Traversal**

The deployment's output includes the identity's **Client ID**. In Traversal, go to **Integrations**, select Azure, and enter that Client ID along with your tenant ID.

> [!NOTE]
>
> To grant roles across a whole management group instead of listing subscriptions one by one, leave `roleAssignmentScopes` empty above, so the first deployment only creates the identity. Then deploy a second Bicep template:
>
> ```bash theme={null}
> curl -O https://templates.traversal.com/integrations/modules/management-group-role-assignment.json
> az deployment mg create --management-group-id <management-group-id> --location <location> \
>   --template-file management-group-role-assignment.json \
>   --parameters principalId=<principalId from the first deployment's output>
> ```

## Manual setup

You can use either a **managed identity** or an **app registration** as the identity Traversal authenticates as. A managed identity is simpler and has no client secret that someone could create by mistake. Use it unless your organization's permissions make an app registration easier to set up.

> [tab] Managed identity (recommended)
>
> **1. Create a managed identity**
>
> In the Azure Portal, go to **Managed Identities** → **Create**. Name it, pick a resource group and region, and create it.
>
> Or with the Azure CLI:
>
> ```bash theme={null}
> az identity create --name traversal-access --resource-group <your-resource-group> --location <location>
> ```
>
> **2. Add federated credentials**
>
> Add the same federated credentials the Bicep template above creates. The Client ID field on the Azure integration tile (**Integrations** → Azure) lists the exact issuer and each subject to use. On the identity, go to **Federated credentials** → **Add credential**, scenario **"Kubernetes accessing Azure resources"**, with audience `api://AzureADTokenExchange`.
>
> Or with the Azure CLI, once per subject:
>
> ```bash theme={null}
> az identity federated-credential create --name <a name for this credential> \
>   --identity-name traversal-access --resource-group <your-resource-group> \
>   --issuer "<issuer from the Azure integration tile>" \
>   --subject "<a subject from the Azure integration tile>" \
>   --audiences api://AzureADTokenExchange
> ```
>
> **3. Grant roles**
>
> Assign both roles below to the identity on each subscription you want visible:
>
> ```bash theme={null}
> PRINCIPAL_ID=$(az identity show -n traversal-access -g <your-resource-group> --query principalId -o tsv)
>
> for role in "Reader" "Log Analytics Reader"; do
>   az role assignment create --assignee-object-id "$PRINCIPAL_ID" \
>     --assignee-principal-type ServicePrincipal \
>     --role "$role" --scope /subscriptions/<subscription-id>
> done
> ```
>
> Repeat for each additional subscription, including the one that hosts your Log Analytics workspaces (see the note under [Required roles](#required-roles)).
>
> **4. Add the integration in Traversal**
>
> Get the identity's Client ID and your tenant ID:
>
> ```bash theme={null}
> az identity show -n traversal-access -g <your-resource-group> --query clientId -o tsv
> az account show --query tenantId -o tsv
> ```
>
> In Traversal, go to **Integrations**, select Azure, and enter both values.

> [tab] App registration
>
> **1. Create an app registration**
>
> In the Azure Portal, go to **App registrations** → **New registration**. Name it and choose **"Accounts in this organizational directory only"**. The app doesn't need to be visible outside your tenant.
>
> **2. Add federated credentials**
>
> Add the same federated credentials the Bicep template above creates. The Client ID field on the Azure integration tile (**Integrations** → Azure) lists the exact issuer and each subject to use. On the app, go to **Certificates & secrets** → **Federated credentials** → **Add credential** → **"Other issuer"**, with audience `api://AzureADTokenExchange`. No client secret is needed or created.
>
> **3. Grant roles**
>
> Assign both roles below to the app's service principal on each subscription you want visible:
>
> ```bash theme={null}
> for role in "Reader" "Log Analytics Reader"; do
>   az role assignment create --assignee <app's Client ID> --role "$role" --scope /subscriptions/<subscription-id>
> done
> ```
>
> Repeat for each additional subscription, including the one that hosts your Log Analytics workspaces (see the note under [Required roles](#required-roles)).
>
> **4. Add the integration in Traversal**
>
> In Traversal, go to **Integrations**, select Azure, and enter the app's Client ID and your tenant ID (both visible on the app's Overview page).

> [!TIP]
>
> To connect another identity in the same tenant or a different one, repeat these steps. Azure supports one integration instance per identity.

## Private network access

If the service endpoint isn't directly reachable by Traversal (as is common with self-hosted services), deploy a [Traversal Connector](https://docs.traversal.com/architecture/connector.md) in a network that can reach it. When configuring the integration, select that connector under **Network Access Needed**. The service endpoint doesn't need public internet exposure.

See [Set up the Traversal Connector](https://docs.traversal.com/setup/connector.md) for deployment and network requirements.

> [!NOTE]
>
> Authentication is the same either way. A Connector changes which network the Azure calls come from, not how Traversal authenticates.

## More information

* [Finding your Microsoft Entra tenant ID](https://learn.microsoft.com/en-us/entra/fundamentals/how-to-find-tenant)
* [Azure built-in roles reference](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles)
* [Azure DevOps integration](https://docs.traversal.com/integrations/azure-devops.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.