New: Access Diff now reviews Terraform pull requests on GitHub

Microsoft Azure

Connect Azure subscriptions to AccessRoot with scoped, read-only permissions and see access through RBAC scopes, managed identities and Microsoft Entra ID context.

In Azure, the role matters, but the scope it is assigned at changes everything. The Azure connection lets AccessRoot read role assignments and identities across your hierarchy so you can see where a role actually gives access, and review changes that widen a scope before they merge.

What AccessRoot reads

For the subscriptions you connect, AccessRoot reads:

  • Azure RBAC role assignments, including the inheritance from management groups, subscriptions, resource groups and individual resources;
  • managed identities and federated identity credentials, such as the credential a GitHub Actions workflow uses;
  • the permission model used by Key Vault resources, so that it can tell whether access to a vault is governed by Azure RBAC.

Microsoft Entra ID context is added to this model: the users, groups and federation that sit behind an identity. Together they show which human and machine identities can reach which resources, and how.

Connect a subscription

You need permission to create an identity and assign a read role at the scope you want analyzed.

  1. Open Settings › Connections and choose Azure under Cloud environments.
  2. Follow the setup to create a scoped identity for AccessRoot and grant it read permissions on the subscriptions you want analyzed. The setup shows the permissions to grant.
  3. Select the subscriptions, for example halvorne-production.
  4. If you want user and group context, connect Microsoft Entra ID under Identity and collaboration.
  5. Save the connection.

The connection is listed as Read-only, for example “Azure · halvorne-production”, with the description Scoped identity, read permissions.

Example: the right role at the wrong scope

The sample workspace shows how scope changes the outcome. The deploy.yml workflow authenticates as the user-assigned managed identity mi-platform-deploy through a federated identity credential. It needs to read configuration secrets from one Key Vault, kv-deployment-config.

Pull request #231 changes infra/azure/access.tf:

resource "azurerm_role_assignment" "deploy_secrets" {
  scope                = azurerm_resource_group.production.id
  role_definition_name = "Key Vault Secrets User"
  principal_id         = azurerm_user_assigned_identity.platform_deploy.principal_id
}

The role is right. The scope is the problem. The assignment is made on the rg-production resource group, and that group also contains kv-customer-prod, a vault with sensitive customer credentials. Both vaults use the Azure RBAC permission model, so the assignment also authorizes reading secrets in kv-customer-prod.

Field Value
Principal mi-platform-deploy
Role Key Vault Secrets User
Scope Resource group rg-production
Intended vault kv-deployment-config

Access Diff reports the unexpected authorization to production customer secrets on the pull request, before the merge. The recommended change is to narrow the assignment from rg-production to the kv-deployment-config resource. As with every finding, this describes what becomes authorized, not that the workflow read the secrets.

What you can do once it is connected

  • See where a role assignment reaches, and which identities inherit it. See Access Graph.
  • Review proposed Terraform or OpenTofu changes that grant a role at a broader scope than intended. See Access Diff.
  • Prepare a narrower assignment as a pull request. See Remediation.
  • Compare approved assignments with what Azure reports. See Access Drift.

Change or remove the connection

Administrators can update the subscriptions in scope, or revoke the connection, under Settings › Connections. Revoking stops new collection. Metadata that was already collected remains subject to your retention and deletion settings. Each change appears in Settings › Audit log. See Workspace and audit.