
The Paradox of Collecting Privilege Data
Azurehound exists to reveal excessive privilege, so it would be ironic to run it with excessive privilege. Yet it is common to see collections performed with Global Administrator accounts simply because "it works". That approach creates unnecessary risk: the credential becomes a prime target, and any compromise of the collection host could hand an attacker the keys to the tenant.
The better approach is a dedicated, read-only identity with exactly the permissions Azurehound needs. This guide explains how to design that identity, which permissions to grant, how to scope Azure access and how to govern the setup over time.
How Much Can a Normal User See?
By default, Entra ID allows member users to read a great deal of directory information: users, groups, applications and service principals. A standard user account can therefore produce a substantial Azurehound collection. However, defaults vary, administrators can restrict directory access, and some data, particularly role assignment details and Azure resources, requires explicit permissions.
For a complete and reliable collection, a purpose-built service principal is the recommended approach.
Step 1: Register a Dedicated Application
In the Entra admin centre, register a new application. Choose a clear, descriptive name such as AzureHound-Collector, so its sign-ins and audit events are immediately recognisable. A single-tenant registration is appropriate for internal use.
Record the Application (client) ID and Directory (tenant) ID; Azurehound needs both.
Step 2: Grant Microsoft Graph Application Permissions
Under API permissions, add Microsoft Graph application permissions (not delegated permissions, since there is no signed-in user):
| Permission | Why Azurehound needs it |
|---|---|
| Directory.Read.All | Read users, groups, applications, service principals, devices and memberships |
| RoleManagement.Read.All | Read directory role definitions, assignments and eligibility |
Then grant admin consent for the tenant. Without consent, the permissions are listed but not effective.
These are the permissions commonly documented for BloodHound Enterprise collectors. Both are read-only. Avoid adding write permissions "just in case"; Azurehound never needs them.
Step 3: Grant Azure RBAC Reader
Graph permissions cover the directory, but Azure resources are governed by Azure role-based access control. Assign the built-in Reader role to the service principal at the scope you want to collect:
- Root management group: covers every subscription in the tenant, ideal for a complete view.
- Specific management groups: useful when only part of the estate is in scope.
- Individual subscriptions: appropriate for narrow assessments.
Assigning Reader at the root management group requires elevated rights to perform once, typically by a Global Administrator who temporarily elevates access. Document that one-off action in your change records.
Reader allows Azurehound to list subscriptions, resource groups, virtual machines, key vaults and other resources, along with their role assignments, without being able to change anything.
Step 4: Use Certificate Credentials
Under Certificates & secrets, upload a public certificate rather than creating a client secret. Keep the private key on the collection host, ideally in a protected store. Azurehound then authenticates with:
azurehound list -a "<client-id>" --cert ./collector.pem --key ./collector.key \
--tenant "<tenant-id>" -o tenant.json
Certificates avoid shared secrets travelling through scripts, tickets or chat. Set an expiry that matches your rotation policy, commonly 6 to 12 months.
Step 5: Protect the Collector Identity
Even read-only access to an entire tenant is sensitive. An attacker with these credentials could map your organisation just as effectively as you can. Protect the identity accordingly:
- Workload identity Conditional Access, where licensed, can restrict where the service principal signs in from.
- Restrict the collection host: a hardened, dedicated machine or locked-down automation runner.
- Monitor sign-ins: alert on sign-ins from unexpected IP addresses or at unexpected times.
- No owners beyond administrators: application owners can add credentials, so keep the owner list minimal.
That last point is especially important. Azurehound itself would flag an ordinary user who owns a powerful application as an attack path, so do not create one with your own collector.
Step 6: Validate the Setup
Run a test collection and verify coverage:
- Run
azurehound listwith the service principal. - Review the log output for errors or permission warnings.
- Count objects by type and compare with figures in the Entra admin centre and Azure portal.
- Import into BloodHound and confirm subscriptions and resources appear.
If directory data is present but Azure resources are missing, the RBAC assignment is not effective at the expected scope. If role assignments are missing, check that RoleManagement.Read.All has admin consent.
What Not to Grant
| Avoid | Reason |
|---|---|
| Global Administrator | Far beyond read requirements; turns the collector into a tier-zero asset |
| Directory.ReadWrite.All | Write permissions are never needed |
| Owner or Contributor in Azure | Reader is sufficient for collection |
| Delegated permissions for automation | Ties collection to a user session unnecessarily |
| Long-lived client secrets | Harder to protect than certificates |
Governance Over Time
Treat the collector identity like any other privileged workload:
- Review its permissions quarterly.
- Rotate certificates before expiry.
- Record which Azurehound version and identity produced each collection.
- Remove the application entirely if the programme ends.
Consultants and Temporary Access
External assessors often receive temporary access. The same principles apply on a smaller scale: create a time-limited service principal or account with read-only rights, use it only for the engagement, and have the client remove it afterwards. Clear documentation protects both parties.
Documenting the Collector for Auditors
Auditors and risk committees increasingly ask how security tooling itself is governed. A short document describing your Azurehound collector answers those questions before they are asked. Keep it in your security documentation repository and update it whenever something changes.
The document should include:
- Purpose: why Azurehound is used and which decisions its data supports.
- Identity: the application name, client ID and tenant, and who owns it.
- Permissions: the Graph application permissions, admin consent date and RBAC Reader scope.
- Credential: the credential type, storage location, expiry date and rotation process.
- Host: where collections run and how that host is protected.
- Schedule: how often collections occur and who reviews the results.
- Data handling: where output is stored, who can access it and how long it is retained.
Pair the document with evidence. Screenshots of the permission configuration, a log extract showing successful scheduled runs and the latest access review of the application all demonstrate that the collector is managed deliberately.
Testing the setup with Azurehound itself
A neat final check is to look for your own collector in the BloodHound graph. Confirm that the service principal has no unexpected owners, holds only the intended permissions and has no paths leading to it from ordinary users. If Azurehound reveals a path to the collector, fix it immediately; the identity that maps your tenant should never be easy to reach.
A Quick Pre-Flight Checklist
Before the first production collection, run through a short checklist with the identity team. Confirm that the application has a clear name and description, that admin consent shows as granted for both Graph permissions, and that the Reader assignment appears at the intended scope in the Azure portal. Check that the certificate expiry date is recorded in your rotation calendar and that only administrators appear as application owners. Confirm that sign-in monitoring for the service principal is active and that the output folder on the collection host has restrictive permissions. Ten minutes spent on this checklist avoids incomplete collections, surprised colleagues and, most importantly, a collector identity that becomes an attack path in its own right.
Key Takeaways
- Avoid running Azurehound as Global Administrator; use a dedicated read-only identity instead.
- Grant Microsoft Graph
Directory.Read.AllandRoleManagement.Read.Allapplication permissions with admin consent. - Assign Azure RBAC Reader at the root management group, specific management groups or subscriptions.
- Authenticate with certificates, store private keys securely and rotate them on schedule.
- Keep the application's owner list minimal and monitor its sign-ins.
- Validate coverage after setup by comparing object counts with the Entra admin centre and Azure portal.
- Document the collector's purpose, permissions, credential and data handling for auditors.
FAQs
Directory.Read.All and RoleManagement.Read.All application permissions plus Azure RBAC Reader.Conclusion
A least-privilege Azurehound setup combines a dedicated application, read-only Microsoft Graph permissions with admin consent, Azure Reader at the right scope and certificate-based authentication. Protect that identity as the sensitive asset it is, validate its coverage, and review it regularly. The result is complete, trustworthy attack-path data, collected without creating the very kind of risk Azurehound is meant to uncover.


