Skip to main content
Connect your Microsoft Azure subscription to Annie to unlock real-time infrastructure mapping, monitoring, and dependency insights—using Azure-native security primitives with service principal authentication.
Security First: All the roles listed below provide read-only access to your infrastructure. Anyshift cannot access secrets, passwords, API keys, or any other sensitive data stored in your Azure subscription.

Required Roles and Permissions

Setup Options

View all permissions that Anyshift uses for comprehensive infrastructure scanning:

Compute Resources

  • Microsoft.Compute/virtualMachines/read
  • Microsoft.Compute/virtualMachineScaleSets/read
  • Microsoft.Compute/disks/read
  • Microsoft.Compute/diskEncryptionSets/read
  • Microsoft.Compute/availabilitySets/read

Network Resources

  • Microsoft.Network/virtualNetworks/read
  • Microsoft.Network/networkInterfaces/read
  • Microsoft.Network/networkSecurityGroups/read
  • Microsoft.Network/publicIPAddresses/read
  • Microsoft.Network/loadBalancers/read
  • Microsoft.Network/privateDnsZones/read
  • Microsoft.Network/applicationGateways/read
  • Microsoft.Network/azureFirewalls/read
  • Microsoft.Network/virtualNetworkGateways/read
  • Microsoft.Network/dnszones/read

Storage Resources

  • Microsoft.Storage/storageAccounts/read
  • Microsoft.Storage/storageAccounts/blobServices/read
  • Microsoft.Storage/storageAccounts/blobServices/containers/read
  • Microsoft.Storage/storageAccounts/fileServices/read
  • Microsoft.Storage/storageAccounts/fileServices/shares/read
  • Microsoft.Storage/storageAccounts/queueServices/read
  • Microsoft.Storage/storageAccounts/tableServices/read

Container Resources

  • Microsoft.ContainerService/managedClusters/read
  • Microsoft.ContainerService/managedClusters/agentPools/read
  • Microsoft.ContainerRegistry/registries/read

Identity & Authorization

  • Microsoft.ManagedIdentity/userAssignedIdentities/read
  • Microsoft.Authorization/roleAssignments/read
  • Microsoft.Authorization/roleDefinitions/read

App Service & Serverless

  • Microsoft.Web/sites/read
  • Microsoft.Web/serverfarms/read
  • Microsoft.Web/sites/functions/read

Databases

  • Microsoft.Sql/servers/read
  • Microsoft.Sql/servers/databases/read
  • Microsoft.Sql/servers/elasticPools/read
  • Microsoft.DocumentDB/databaseAccounts/read
  • Microsoft.Cache/redis/read

Messaging & Events

  • Microsoft.ServiceBus/namespaces/read
  • Microsoft.ServiceBus/namespaces/queues/read
  • Microsoft.ServiceBus/namespaces/topics/read
  • Microsoft.EventHub/namespaces/read
  • Microsoft.EventHub/namespaces/eventhubs/read

Other Resources

  • Microsoft.KeyVault/vaults/read
  • Microsoft.OperationalInsights/workspaces/read
  • Microsoft.ApiManagement/service/read
  • Microsoft.Insights/alertRules/read
  • Microsoft.Insights/diagnosticSettings/read
  • Microsoft.Resources/subscriptions/read
  • Microsoft.Resources/subscriptions/resourceGroups/read

Setup Guide

Workload Identity Federation allows Anyshift to authenticate to Azure without a client secret. Instead, Anyshift signs a short-lived JWT token that Azure trusts via a federated identity credential. This eliminates secret rotation and is more secure.

Step 1 - Register an Application in Microsoft Entra ID

Follow the same steps as Option 1 to create an App Registration and assign the Reader role, but skip creating a client secret.Terraform
# Create the Azure AD Application
resource "azuread_application" "anyshift" {
  display_name = "anyshift-readonly"
}

# Create the Service Principal
resource "azuread_service_principal" "anyshift" {
  client_id = azuread_application.anyshift.client_id
}

# Assign Reader role at Management Group level
resource "azurerm_role_assignment" "anyshift_reader" {
  scope                = "/providers/Microsoft.Management/managementGroups/${var.management_group_id}"
  role_definition_name = "Reader"
  principal_id         = azuread_service_principal.anyshift.object_id
}
Azure Portal
  1. Go to Microsoft Entra IDApp registrationsNew registration
  2. Enter:
    • Name: anyshift-readonly
    • Supported account types: “Accounts in this organizational directory only”
    • Click Register
  3. Note the Application (client) ID and Directory (tenant) ID
  4. Assign the Reader role as described in Option 1, Step 2

Step 2 - Add Credentials in Anyshift

  1. Go to IntegrationsAzureCredentialsNew Credential
  2. Select OIDC as the authentication method
  3. Enter:
    • Tenant ID: Your Azure AD tenant ID
    • Client ID: The Application (client) ID from Step 1
  4. Click Save
Anyshift will display a dialog with three values you need for the next step:
  • Issuer URL: The Anyshift OIDC issuer (e.g. https://api.anyshift.io)
  • Subject Identifier: A unique identifier for this credential (e.g. anyshift:project:<project-id>:credential:<credential-id>)
  • Audience: api://AzureADTokenExchange
Copy these values using the copy buttons in the dialog.

Step 3 - Configure Federated Identity Credential in Azure

Using the values from the Anyshift dialog:Terraform
resource "azuread_application_federated_identity_credential" "anyshift" {
  application_id = azuread_application.anyshift.id
  display_name   = "anyshift-oidc"
  issuer         = "<ISSUER_URL>"           # From the dialog
  subject        = "<SUBJECT_IDENTIFIER>"    # From the dialog
  audiences      = ["api://AzureADTokenExchange"]
}
Azure Portal
  1. Go to Azure PortalApp Registrations → your app → Certificates & secretsFederated credentials
  2. Click Add credential and select Other issuer
  3. Paste the Issuer URL, Subject Identifier, and Audience values from the Anyshift dialog
  4. Click Add

Step 4 - Verify the Connection

Click Done & Verify Connection in the Anyshift dialog. Anyshift will trigger a scan to verify the federation is working correctly.

Troubleshooting

Common Issues

Status shows “Error” after adding credentials This typically means the service principal doesn’t have the required permissions. Verify that:
  1. The Reader role is assigned at the subscription level
  2. The credentials (Tenant ID, Client ID, Client Secret) are correct
  3. The client secret hasn’t expired (for service principal auth)
Status shows “Error” with OIDC federation
  1. Verify the federated identity credential is configured correctly in Azure AD (Issuer URL, Subject Identifier, Audience)
  2. Ensure the Issuer URL matches exactly (no trailing slash)
  3. Check that the App Registration has the Reader role assigned
No resources showing up
  1. Ensure the service principal has access to the correct subscription
  2. Check that resources exist in the subscription
  3. Allow a few minutes for the initial scan to complete
Multiple subscriptions Anyshift automatically discovers and scans all subscriptions accessible by the service principal. Assign Reader role at the Management Group level to cover all subscriptions you want to track - no need to create separate credentials for each subscription.

Try Anyshift

Start mapping your Azure infrastructure today!