Skip to main content
To connect Azure as a data source for infrastructure inventory, observability, cost analysis, and optimization insights, you need to create a service principal with appropriate permissions.

Prerequisites

  1. Azure CLI installed and configured
  2. An Azure subscription with appropriate admin access to create roles and service principals
  3. An Entra App (Service Principal) for authentication

Step 1: Get Your Subscription ID

Run the following command to get your Azure subscription ID:
Or find it in the Azure Portal.

Step 2: Create a Custom Role

Save the following role definition to a file called custom-role.json. Replace {subscription-id} with your actual subscription ID from Step 1.
Create the custom role using Azure CLI:

Step 3: Create an Entra App (Service Principal)

Create a new App Registration in Azure Entra (formerly Azure Active Directory). You can follow the official instructions here. After creating the Entra App, note down the following values:
  • Tenant ID (Directory ID)
  • Client ID (Application ID)
Then create a Client Secret within the Entra App under “Certificates & secrets”.

Step 4: Assign the Custom Role to the Service Principal

Assign the custom role to your service principal:

Step 5: Configure in Doctor Droid Platform

  1. Navigate to the Integrations tab in the Doctor Droid platform
  2. Click Add New Integration
  3. Select Azure and click Connect
  4. Fill in the following credentials:
  1. Click Save to complete the integration

Permissions Overview

The custom role provides read-only access to:

Troubleshooting

Role Creation Failed

Ensure you have Microsoft.Authorization/roleDefinitions/write permission on the subscription. You may need Owner or User Access Administrator role.

Role Assignment Failed

Verify that:
  • The Client ID is correct
  • The service principal exists
  • You have permission to assign roles on the subscription

Integration Test Failed

Check that:
  • All credentials (Client ID, Client Secret, Tenant ID, Subscription ID) are correct
  • The Client Secret has not expired
  • The role assignment is complete and propagated (may take a few minutes)