---
title: "Microsoft Azure"
canonical_url: "https://docs.getdx.com/connectors/azure/"
md_url: "https://docs.getdx.com/connectors/azure.md"
last_updated: "2026-11-20"
---

# Microsoft Azure
Connect Microsoft Azure to DX to import resource metadata and tags from the subscriptions you select. One DX connection supports multiple subscriptions across one or more Microsoft Entra tenants, using a single application and credential that your organization owns.

This connector supports Azure public cloud. For repositories, boards, and pipelines, use the [Azure DevOps connectors](https://docs.getdx.com/connectors/azure-devops/).

## Setup instructions

### Step 1: Register an Entra application

1. Open the [Microsoft Entra admin center](https://entra.microsoft.com/) and switch to the tenant where your organization will own the application.
2. Go to **Entra ID > App registrations > New registration** and name the application, for example, `DX Azure Inventory`.
3. Choose the supported account type:
   - For subscriptions in one tenant, choose the single-tenant option.
   - For subscriptions in multiple tenants, choose the multitenant option for organizational directories, also called **Accounts in any organizational directory** or **Multiple Entra ID tenants**.
4. Leave the redirect URI empty and register the application.
5. On **Overview**, copy the **Application (client) ID** and **Directory (tenant) ID**.

See Microsoft's [app registration instructions](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app). DX uses application credentials for background imports; no interactive user sign-in or redirect URI is needed.

### Step 2: Add a credential

Choose one authentication method for the connection. The same credential is used for every configured tenant.

#### Client secret

1. In the app registration, open **Certificates & secrets > Client secrets > New client secret**.
2. Enter a description and choose an expiration date, then select **Add**.
3. Copy the secret's **Value** while it is displayed. DX needs the value, not the secret ID.

#### Certificate

1. Obtain an RSA private key and matching X.509 certificate.
2. In the app registration, open **Certificates & secrets > Certificates > Upload certificate** and upload the public certificate.
3. Keep the public certificate in PEM format and its matching, unencrypted RSA private key in PEM format for the DX connection.

DX accepts the complete PEM contents, including the `BEGIN` and `END` lines.

### Step 3: Grant Reader access to each subscription

1. In the [Azure portal](https://portal.azure.com/), open **Subscriptions** and select a subscription to import.
2. Copy its **Subscription ID** and confirm its **Directory (tenant) ID**. See [finding subscription and tenant IDs](https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id).
3. Open **Access control (IAM) > Add > Add role assignment**.
4. Select the **Reader** role.
5. Under **Members**, choose **User, group, or service principal**, then select your application's service principal. Confirm the application/client ID to distinguish applications with similar names.
6. Complete **Review + assign**. Repeat for every selected subscription.

Assign access at the subscription scope so DX can enumerate its supported resources. Resource-group-only access does not provide complete subscription inventory. The built-in [Reader role](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/general#reader) grants access to resource metadata without write access or data-plane permissions.

For subscriptions in other tenants, first complete [Connecting multiple tenants](#connecting-multiple-tenants) below so the application has a local service principal in each tenant.

### Step 4: Configure the connection in DX

1. In DX, open **Settings > Data connectors > Add connector** and choose **Microsoft Azure**.
2. Enter a connection name and the **Application (client) ID** from Step 1.
3. Choose **Client secret** or **Certificate** and enter the credential from Step 2.
4. Optionally enter its **Credential expiration date** to receive expiration reminders.
5. Under **Tenants and subscriptions**, enter a **Directory (tenant) ID** and the **Subscription IDs** that belong to it. Use **Add subscription** for more subscriptions in the same tenant, or **Add tenant** for another tenant.
6. Submit the form to verify and save the connection.

Use the application/client ID in DX, not an app registration or service principal object ID. Each subscription should appear under exactly one tenant. DX imports only the subscription IDs you enter; granting access to another subscription does not automatically add it to the connection.

Verification confirms access to at least one selected subscription. The subsequent inventory scan checks all configured scopes and resource types, so successful verification does not guarantee a complete import. Check the import result after setup.

## Connecting multiple tenants

An application registration belongs to one home tenant. A multitenant application can have a separate **service principal**, shown under **Enterprise applications**, in each tenant where it is used. These service principals share the application's client ID but have different object IDs and role assignments. See [applications and service principals](https://learn.microsoft.com/en-us/entra/identity-platform/app-objects-and-service-principals).

For each additional tenant:

1. Confirm that the original app registration supports multiple organizational tenants.
2. Have an authorized administrator sign in to the additional tenant and create the application's local service principal. With [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/reference-index?view=azure-cli-latest#az-login):

   ```bash
   az login --tenant "<additional-tenant-id>" --allow-no-subscriptions
   az ad sp create --id "<application-client-id>"
   ```

   The [service principal creation command](https://learn.microsoft.com/en-us/cli/azure/ad/sp?view=azure-cli-latest#az-ad-sp-create) uses the existing application. If it already has a service principal in that tenant, use the existing one.

3. Grant that tenant's service principal **Reader** on each selected subscription, following Step 3 above.
4. Add the tenant ID and its subscription IDs to the same DX connection.

Keep using the original app registration's client ID and secret or certificate. You do not need another app registration or credential per tenant. Multitenant registration alone does not grant access: the local service principal and subscription role assignments are required in each tenant.

If assigning Reader through the CLI, obtain the service principal's object ID in the target tenant and use it in the role assignment:

```bash
az ad sp show --id "<application-client-id>" --query id --output tsv

az role assignment create \
  --assignee-object-id "<service-principal-object-id-in-this-tenant>" \
  --assignee-principal-type ServicePrincipal \
  --role Reader \
  --scope "/subscriptions/<subscription-id>"
```

The principal object ID is used for Azure role assignments; DX asks for the shared application/client ID. See [assigning roles with Azure CLI](https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-cli).

## API reference

In the table, `S` means `/subscriptions/{subscriptionId}`. Parent IDs such as `{sqlServerId}`, `{storageAccountId}`, and `{namespaceId}` are full ARM resource paths returned by the parent API.


| Resource | GET path |
| --- | --- |
| Selected subscription | `S` |
| Virtual machines | `S/providers/Microsoft.Compute/virtualMachines` |
| VM runtime status | `S/providers/Microsoft.Compute/virtualMachines` |
| SQL servers | `S/providers/Microsoft.Sql/servers` |
| SQL databases | `{sqlServerId}/databases` |
| SQL Managed Instances | `S/providers/Microsoft.Sql/managedInstances` |
| PostgreSQL Flexible Servers | `S/providers/Microsoft.DBforPostgreSQL/flexibleServers` |
| MySQL Flexible Servers | `S/providers/Microsoft.DBforMySQL/flexibleServers` |
| Function Apps | `S/providers/Microsoft.Web/sites` |
| AKS clusters | `S/providers/Microsoft.ContainerService/managedClusters` |
| Cosmos DB accounts | `S/providers/Microsoft.DocumentDB/databaseAccounts` |
| Storage accounts | `S/providers/Microsoft.Storage/storageAccounts` |
| Blob containers | `{storageAccountId}/blobServices/default/containers` |
| Azure Cache for Redis | `S/providers/Microsoft.Cache/redis` |
| Managed Redis / Redis Enterprise | `S/providers/Microsoft.Cache/redisEnterprise` |
| Virtual networks | `S/providers/Microsoft.Network/virtualNetworks` |
| Network security groups | `S/providers/Microsoft.Network/networkSecurityGroups` |
| Service Bus namespaces | `S/providers/Microsoft.ServiceBus/namespaces` |
| Service Bus queues | `{namespaceId}/queues` |
| Storage queues | `{storageAccountId}/queueServices/default/queues` |
| Service Bus topics | `{namespaceId}/topics` |


## Troubleshooting


| Problem | What to check |
| --- | --- |
| Cannot register the app or add a credential | Ask an Entra administrator for application-management access. Subscription Reader access alone does not allow app registration. |
| Cannot assign Reader | The administrator needs role-assignment permission at the subscription scope. Application Administrator alone does not provide it. |
| Invalid credentials | Check the application/client ID, secret **Value** and expiration date, or that the uploaded certificate matches the PEM certificate and private key supplied to DX. |
| A tenant cannot authenticate | Check the tenant ID, the app's multitenant setting, and that the target tenant has a service principal for that client ID. |
| A subscription is inaccessible | Confirm it belongs to the configured tenant and Reader is assigned to that tenant's local service principal at the subscription scope. Allow time for a new role assignment to take effect. |
| Verification succeeds but the import is incomplete | Verification needs access to at least one selected subscription. Check permissions on every configured subscription and inspect the failed import. |
| An import contains no resources | An empty inventory is valid. Check that the selected subscriptions contain resource types listed under Supported resources. |
| Tags or child resources are missing | Check the resource's tag support, supported storage account kind, and whether its parent or child listing failed. Parent tags are not inherited. |
---

## Sitemap

[Overview of all docs pages](/llms.txt)
