Connect using Workload Identity Federation

In this guide, you will use the Guardrails Create Connection wizard to connect your Azure Tenant using Workload Identity Federation (WIF), keyless authentication, with no client secret to create, store, or rotate.

For background on permissions, sovereign cloud support, and how the federation round-trip works, see Set Up Workload Identity Federation.

Prerequisites

Step 1: Open the Create Connection Wizard

From the Accounts page, click Create Connection. The wizard opens on the Select a Provider screen.

Create Connection wizard Select a Provider screen showing AWS, Azure, GCP, OCI, GitHub, Kubernetes, and ServiceNow provider cards

Click Azure.

Step 2: Choose Connection Type

Choose Azure Tenant. The Azure Subscription option uses Client Secret authentication and is documented separately at Connect a Subscription.

Azure Connection Type screen with Azure Tenant (Recommended) and Azure Subscription options

Step 3: Enter Azure Credentials

The wizard opens on the Azure Credentials step. Workload Identity Federation is selected as the access mode by default. It is marked Recommended.

Azure Credentials wizard step showing Azure Environment dropdown set to Global Cloud, Access Mode with Workload Identity Federation selected, fields for Tenant ID and Client ID, and a Configure WIF in Azure section with the Azure Setup Script download disabled

Fill in the fields under Your Azure App Registration:

FieldDescription
Azure EnvironmentYour Azure cloud. Options: Global Cloud (default), US Government, China Cloud. The wizard uses this to pick the correct federated credential audience.
Tenant IDYour Azure Directory (tenant) ID. Find it in the Azure Portal under Microsoft Entra ID > Overview.
Client ID (appId)The Application (client) ID from your App Registration.

Notice there is no Client Secret field in WIF mode. WIF replaces the client secret entirely.

[!TIP] If you don't have an App Registration yet, expand Don't have an Azure App Registration? Create one to see a copy-pasteable az ad app create command. Run it in Azure CLI and paste the resulting appId into the Client ID field.

Download and Run the Azure Setup Script

Once Tenant ID and Client ID are filled in, the Download setup-azure-wif.sh button becomes active. The script is pre-filled with your Tenant ID, Client ID, and the Guardrails WIF role ARN. You do not need to look any of those up.

Azure Credentials step with Tenant ID and Client ID filled in and the Download setup-azure-wif.sh button enabled

  1. Click Download setup-azure-wif.sh.
  2. Open Azure CLI and run az login against your target tenant.
  3. Run the script. It performs four actions in your tenant:
    • Creates a Service Principal for the App Registration if one doesn't exist.
    • Creates a federated identity credential named turbot-guardrails-wif on the App Registration, trusting the Guardrails AWS account's OIDC issuer for the specific transit role and audience.
    • Grants Microsoft Graph application permissions (Directory.Read.All, Policy.Read.All, AccessReview.Read.All) and grants admin consent. These cover the AAD / Entra ID controls included with tenant imports.
    • Grants Reader RBAC at the tenant root management group.
  4. Return to the Guardrails wizard and click Continue.

[!NOTE] Enterprise (self-hosted) deployments may show an additional AWS Setup Script card in this step that you must download and run in the Guardrails AWS account before the Azure script. It enables AWS outbound web identity federation and writes the OIDC issuer URL to SSM. SaaS customers (shown above) do not see this card. Turbot has already configured the AWS side. The order in both cases is AWS-side first (if shown), then Azure-side.

Step 4: Discover the Tenant

Click Discover Tenant. Guardrails performs the full WIF round-trip: assumes the WIF transit role, mints an OIDC JWT, exchanges it for an Entra ID access token, then calls Azure Resource Manager to enumerate management groups and subscriptions.

On success, you see Tenant Discovered with a summary of your subscriptions and management groups.

Discover Tenant step showing Tenant Discovered success with Tenant Summary panel reporting 24 subscriptions enabled, 12 management groups, 0 already imported, and 24 new

[!TIP] If discovery fails right after running the setup script, it is most likely Azure RBAC propagation delay. Wait 1–2 minutes and retry.

Click Continue.

Step 5: Configure Subscription Discovery

The wizard shows your discovered tenant hierarchy. Each subscription has a Discovery Level dropdown.

Configure Discovery Levels step showing the Goliath Federal Bank tenant hierarchy with the Tenant Root Group management group and subscriptions including management-subscription-do-not-delete, Infrastructure, Sandbox, Security, Suspended, and Workloads groups each with Discovery Level set to Subscription Only

Discovery LevelWhat Guardrails DiscoversWhat You Get
NoneNothing, the subscription is excludedThe subscription is not imported.
Subscription OnlySubscription metadata and identitySubscription-level visibility, appears in the Accounts list and Guardrails evaluates tenant-level governance posture.
All ResourcesEverything in Subscription Only, plus individual resources (storage accounts, VMs, databases, etc.)Full Guardrails visibility: runtime controls, resource-level policy evaluation, and auto-remediation.

Discovery levels set on a management group cascade to all its children. Individual subscriptions can override the inherited value.

[!TIP] Starting with Subscription Only minimizes overhead. You can upgrade individual subscriptions to All Resources later as your governance scope grows.

Click Continue.

Step 6: Choose Destination Folder

Choose where to place this connection in your Guardrails resource hierarchy. Select an existing folder or click Create Folder to create a new one.

Destination Folder step with Turbot > Azure selected in the Destination Folder dropdown, and Continue and Create Folder buttons

Click Continue.

Step 7: Review and Connect

The final wizard step shows a summary of your configuration:

  1. Azure Credentials: Tenant ID, Environment, Client ID, and discovery status (Verified). The Azure review summary doesn't display a credential field because no secret is stored. WIF makes that information unnecessary.
  2. Subscription Selection: Number of subscriptions, management groups, and custom level overrides.
  3. Destination Folder: Where the connection will be placed.

Review and Create Connection step listing Azure Credentials with Tenant ID, Environment Global Cloud, Client ID, Discovery Status Verified; Subscription Selection with 24 Subscriptions, 12 Management Groups, 1 Custom Exclusion; Destination Folder Turbot > Azure; and a What happens next panel

Review the details and click Create Connection.

Step 8: Monitor Discovery Progress

After connecting, you are redirected to the tenant overview page. A Discovering Resources banner shows real-time progress while Guardrails enumerates your management groups and subscriptions; discovery typically takes a few minutes depending on tenant size. Once complete, the page shows the tenant's controls breakdown and recent activity.

Goliath Federal Bank Azure tenant overview page showing controls breakdown and recent activity

Switch to the Hierarchy tab to see the discovered management group structure.

Tenant hierarchy view showing the Goliath Federal Bank tenant with the Tenant Root Group management group nested underneath

Step 9: Verify on the Accounts Tab

Navigate to Accounts and click the Azure filter chip to scope the list to your newly connected Azure subscriptions.

Accounts page filtered to Azure subscriptions, showing goliath-sandbox-experiments, goliath-sandbox-poc, and management-subscription-do-not-delete

Verify that CMDB and Discovery controls are in OK state on each subscription.

The Organizations tab shows your new tenant alongside any other imported organizations.

Organizations tab listing two organizations: the existing AWS org aws+goliath+federal+bank@turbot.com and the newly imported Goliath Federal Bank Azure tenant

Next Steps

Troubleshooting

The most common failures:

IssueSolution
WIF radio is greyed outThe Guardrails deployment is missing the WIF transit role or its sts:GetWebIdentityToken policy. Ask your Guardrails administrator to update the TEF stack.
AWS Setup Script card shows up unexpectedlyYou are on an Enterprise (self-hosted) deployment. Run the AWS Setup Script first in the Guardrails AWS account, then refresh the wizard tab before running the Azure script.
Discover Tenant fails: "No matching federated identity record found" (AADSTS70021)The federated credential's issuer, subject, or audiences don't match the wizard values. Re-download and re-run the Azure Setup Script (don't edit the values). Verify with az ad app federated-credential list --id <CLIENT_ID>.
Discovery finds zero subscriptionsAzure RBAC propagation delay. Wait 1–2 minutes and retry. Verify with az role assignment list --assignee <CLIENT_ID> --all.

Less Common Issues

IssueSolution
Azure Setup Script fails: "Insufficient privileges"The signed-in Azure CLI user does not have Application Administrator, Cloud Application Administrator, or App Registration owner rights.
Azure Setup Script fails on role assignment: "Authorization failed"The signed-in user does not have User Access Administrator or Owner at the target scope.
Discover Tenant fails: "Resource principal was not found" (AADSTS500011)Reader RBAC was not granted at the import scope. Re-run the role assignment portion of the Azure Setup Script.
Controls in error state after importThe Guardrails deployment isn't running Azure-WIF-capable code. Confirm with your administrator that the deployment is on a version that supports Azure WIF.
Wrong audience for sovereign cloudThe federated credential audience must match the Azure Environment you selected. The wizard fills this in automatically; if you ran an old script, re-download and re-run it.
Further assistanceOpen a Support Ticket.