Azure Service Principle

Permissions for the azure service principle

This document specifies the exact permissions required for each service principal PAA uses. Granting more than the listed permissions is unnecessary. Granting less will cause partial or complete scan failures.


1. Azure Service Principal

Purpose

Used by Health Checks, Cost Intelligence, Change Monitor (drift detection), and the RBAC Audit. PAA uses this service principal to query Azure Resource Graph and the Azure Cost Management API.

Where to Configure

Settings > Azure

Required Azure RBAC Roles

Assign these roles to the service principal on each subscription you want PAA to scan.

RoleScopeRequired For
ReaderPer subscriptionAll Health Check scanning (Resource Graph queries, resource health, tag compliance, encryption, storage security, naming, resource locks, network security)
Cost Management ReaderPer subscriptionCost Intelligence (spend data, trends, budgets, recommendations)

Both roles must be assigned at the subscription level (not resource group level) for Resource Graph cross-subscription queries to work correctly.

Minimum viable configuration: Reader only. Cost Intelligence will be unavailable without Cost Management Reader.

How to Create the Service Principal

  1. In Azure Portal, open Microsoft Entra ID > App Registrations > New Registration
  2. Name it (e.g., paa-scanner) and register
  3. Under Certificates & Secrets, create a new Client Secret. Note the value immediately — it is only shown once
  4. Note the Application (client) ID and Directory (tenant) ID from the Overview page
  5. In each target subscription, open Access Control (IAM) > Add Role Assignment
  6. Assign Reader to the service principal
  7. Repeat for Cost Management Reader on the same subscriptions
  8. In PAA Settings > Azure, enter the Tenant ID, Client ID, and Client Secret, then click Test Connection

What PAA Does with This Service Principal

Scan AreaAPI UsedPermission Required
Resource health, orphaned resources, tags, encryption, locks, naming, storage securityAzure Resource GraphReader
Network security groups, firewall rulesAzure Resource GraphReader
Diagnostic settings auditAzure Resource GraphReader
RBAC role assignments and custom rolesAzure Resource Graph (AuthorizationResources)Reader
Management group hierarchyAzure Resource ManagerReader
Azure Policy complianceAzure Resource GraphReader
Cost trends, spend breakdown, budgetsAzure Cost Management APICost Management Reader
Cost-based optimization recommendationsAzure Cost Management APICost Management Reader

Notes

  • The service principal only needs read access. PAA does not make changes to your Azure environment.
  • If a subscription uses the Free or Dev/Test offer type, the Cost Management API may return 404 for that subscription. This is an Azure limitation — Reader is still needed for Resource Graph scanning on that subscription.
  • Management group queries work across all subscriptions the service principal can read. If you want to limit scanning to specific subscriptions, configure this under Settings > Azure > Subscriptions to Scan.

Platform Architecture Authority — Crimson Owl Technologies Last updated: March 2026