For the complete documentation index, see llms.txt. A markdown version of this page is at /guides/onboard-azure/index.md.

Onboard Microsoft Azure

Let Ringleader run workstation VMs in one of your Azure resource groups, with a custom role and no client secret.

Let Ringleader run workstation VMs in one of your Azure resource groups, with a custom role and no client secret. Use this when you want workstations on your bill and inside your network.

Prerequisites

  • Ringleader installed, for the rl commands in the last two tasks.
  • Two values from Ringleader, which you receive when your organization is set up: the issuer URL, written with no trailing slash, and your organization’s id, a UUID and never its name. If you do not have them, ask us. Fix a sign-in that your cloud refuses says what to check if Entra rejects them.
  • A resource group for the workstations, which you create first. The module and the script do not. Use a new, empty one that holds nothing else. Workstations are billed to it, and everything Ringleader may do is limited to it. A dedicated resource group keeps the bill and the risk in one place.
  • Permission to create an app registration in your Entra tenant, for this setup only.
  • The subscription feature Microsoft.Compute/UseStandardSecurityType, registered on the subscription. Someone with Contributor or Owner on the subscription registers it once. Register the subscription feature shows how.
  • The examples use the resource group ringleader-workstations and the CloudAccount my-azure-account. Replace them with yours.

Register the subscription feature

Ringleader creates VMs with securityType=Standard, because the Trusted Launch default does not allow the nested virtualization that workstations rely on. Without this feature, every VM create fails: everything else looks right, and no workstation ever starts. Register it once per subscription.

  1. Register the feature:

    az feature register --namespace Microsoft.Compute --name UseStandardSecurityType
  2. Poll until the state is Registered. This can take several minutes.

    az feature show --namespace Microsoft.Compute --name UseStandardSecurityType \
      --query properties.state -o tsv
  3. Propagate the registration:

    az provider register --namespace Microsoft.Compute
  4. Confirm that your chosen region has capacity for the VM size you intend to use. Without it, every create returns SkuNotAvailable.

Set up keyless access

Onboarding creates the identity Ringleader signs in as, a custom role and its assignment on your resource group, and the federated credential that lets Entra accept Ringleader’s tokens. It can also create a network. The Microsoft Azure permissions and resources page lists everything it creates and why it is safe.

Choose the tool your team already runs. All three do the same thing, and the ARM and Terraform paths live in github.com/ringleader-dev/cloud-onboarding. Both finish by printing the values you send back in the next task.

ARM

An ARM template cannot create an app registration or a federated credential, because they live in Entra and not in a resource group. A script creates them with az, then deploys the role, its assignment and the network as templates.

  1. Clone the repository and change into the ARM folder:

    git clone https://github.com/ringleader-dev/cloud-onboarding
    cd cloud-onboarding/azure/arm
  2. Set the variables. SSH_SOURCE_CIDR adds an SSH rule of your own for the addresses your engineers connect from. Cloud accounts and reachability says who can connect without it.

    export RG=ringleader-workstations                      # the resource group you created
    export ISSUER_URL='https://oidc-app.ringleader.dev'
    export ORG_UID='0192f5bf-af83-7178-8d0a-f1c7aea06bde'
    export SSH_SOURCE_CIDR=203.0.113.0/24                   # where your engineers connect from
  3. Sign in to Azure:

    az login
  4. Run the script. It prints the values to send back. It is safe to run again if something goes wrong partway.

    ./deploy.sh

Names for a second resource group in the same tenant

deploy.sh takes two more optional variables, and both matter as soon as a second resource group in the same Entra tenant is onboarded (a second team, a second environment, prod alongside dev). Left at their defaults, one fails loudly and the other fails silently:

export APP_NAME='Ringleader Admin (team-b)'                  # default: ringleader-workstations
export ROLE_NAME='Ringleader Workstation Operator (team-b)'  # default: Ringleader Workstation Operator
  • ROLE_NAME. Azure requires a custom role’s display name to be unique across the whole tenant, even when the roles are scoped to different resource groups. Re-using the default for a second onboarding fails the deployment with RoleDefinitionWithSameNameExists.
  • APP_NAME. deploy.sh finds its app registration by display name and reuses the first match, which is what makes re-runs safe. Left at the default, a second onboarding silently adopts the first onboarding’s application and adds the new federated credential to it, so two boundaries end up sharing one identity. Name the application per team or per environment and the lookup stays honest.

One resource group in a tenant needs neither variable.

Terraform

Terraform creates everything, end to end.

  1. Clone the repository and change into the example folder:

    git clone https://github.com/ringleader-dev/cloud-onboarding
    cd cloud-onboarding/azure/terraform/examples/standalone
  2. Copy the example variables file:

    cp terraform.tfvars.example terraform.tfvars
  3. In terraform.tfvars, set your subscription id, the resource group you created and the two values from Ringleader. Uncomment ssh_source_ranges and list the addresses your engineers connect from.

  4. Sign in to Azure:

    az login
  5. Apply the module:

    terraform init && terraform apply
  6. Print the values to send back:

    terraform output handoff

The portal

The portal gives the same result without deploy.sh. The app registration and its federated credential live in Entra, so you create them in the Entra portal. The role and its assignment are one template, which you deploy to the resource group.

  1. Clone the repository, which holds the template you deploy in step 5:

    git clone https://github.com/ringleader-dev/cloud-onboarding
  2. Create the application. In Microsoft Entra ID, go to App registrations and choose New registration. Give it a name, choose Accounts in this organizational directory only, and register. Copy the Application (client) ID, which is the application client id you send back.

  3. Add the federated credential. On that application, go to Certificates & secrets, then Federated credentials, choose Add credential and pick the scenario Other issuer. Enter these values, with no trailing slash on the issuer:

    FieldValue
    Issuer<issuer-url>/org/<org-id>
    Subject identifierorg:<org-id>
    Nameringleader-oidc
    Audienceapi://AzureADTokenExchange

    All three of issuer, subject and audience must match exactly.

  4. Find the service principal’s object id. In Microsoft Entra ID, go to Enterprise applications, open your application and copy its Object ID. This is not the client id, and it is the value the template wants.

  5. Deploy the role. In the portal search, choose Deploy a custom template, then Build your own template in the editor, load azure/arm/azuredeploy.json from the repository you cloned and choose Save. Choose your resource group, because the template is resource-group scoped, and set principalId to the object id from step 4. The template defaults enableWorkstationIdentities to true, so set it to false unless you use Cloud runtime identities.

If you are onboarding a second resource group in this tenant, give roleName a distinct value in step 5, as the note under ARM explains.

Send the values to your organization administrator

Send the values that Values you hand back lists to whoever administers Ringleader for your organization, which may be you. They are public identifiers, and no secret is among them. How Ringleader uses them is in Keyless cloud access.

Create the CloudAccount

An organization administrator records which application Ringleader signs in as by creating a CloudAccount. The Spec fields table lists every field.

  1. Save this as my-azure-account.yaml, with your organization, application client id and tenant id:

    apiVersion: core.ringleader.dev/v1
    kind: CloudAccount
    metadata:
      name: my-azure-account
    spec:
      org: acme
      provider: azure
      azure:
        # The Entra application (client) id that holds the workstation permissions on
        # your resource group, and whose federated identity credential trusts
        # Ringleader's per-organization issuer.
        targetAppClientId: ec6d0a82-536f-463e-baa5-a10221befa86
        # Your Azure AD tenant.
        tenant: bb90f2d3-842d-41ea-8c0c-0e6671775ef7
  2. Apply it. Apply it before the CloudIdentity that references it. A multi-document apply orders them for you.

    rl apply -f my-azure-account.yaml
  3. List the account to confirm it exists. The alias is rl ca get.

    rl cloudaccount get

Create the CloudIdentity from the remaining values, as CloudIdentity describes.

Check the setup

Check the Azure side first, then Ringleader’s use of it. Replace <client-id> with the application client id.

  1. Confirm that the federated credential accepts only Ringleader’s tokens, for your organization:

    az ad app federated-credential list --id <client-id> \
      --query "[].{name:name, issuer:issuer, subject:subject, audiences:audiences}"
  2. Confirm that the custom role has exactly the actions that Microsoft Azure permissions and resources lists. If you set a custom ROLE_NAME, pass that name instead of the default.

    az role definition list --name "Ringleader Workstation Operator" \
      --query "[0].permissions[0].actions" -o tsv
  3. Confirm that the application holds that role on your resource group, and nothing else:

    az role assignment list --assignee <client-id> \
      --resource-group ringleader-workstations \
      --query "[].roleDefinitionName" -o tsv
  4. After an administrator has created the CloudAccount and the CloudIdentity from the values you sent, wait for the CloudIdentity to be ready. Do this before anyone creates a workstation. Replace azure and dev with the CloudIdentity’s name and namespace:

    rl cloudidentity wait azure -n dev --for Ready --timeout 2m
  5. Read its status:

    rl cloudidentity get azure -n dev -o yaml

    status.valid: true means Ringleader can use the identity.

Optional: Revoke Ringleader’s access

Revoking removes Ringleader’s ability to act in your resource group. Skipping it keeps the access in place. Once you delete the federated credential or the application, Ringleader can get no new Azure token. A token it already holds can work until it expires, usually within 90 minutes.

To remove Ringleader’s access but keep the application:

az ad app federated-credential delete --id <client-id> \
  --federated-credential-id ringleader-oidc

To remove the application entirely:

az ad app delete --id <client-id>

Both of these leave the custom role and its assignment behind. Delete them with az role assignment delete and then az role definition delete, using your role name and the scope /subscriptions/<subscription-id>/resourceGroups/<resource-group>. If your subscription also has a role from an earlier setup, A role on your subscription shows how to delete it.

If you set up with Terraform, run terraform destroy, which removes everything it created.

There is no client-secret alternative

Azure onboarding was once also possible with a client secret you created and handed over. That path is retired: Ringleader stores no cloud credential, and a CloudIdentity naming one is refused at apply. The keyless setup on this page is the only one.

Troubleshoot

If a workstation fails to create with AADSTS700211: No matching federated identity record found on its status, one of the three values Entra checks does not match. Compare them against what was created, starting with the trailing slash. Entra compares the issuer character for character. Checks Entra makes lists the three values.

If every workstation fails to create, and everything else looks right, the subscription feature is probably not registered. Follow Register the subscription feature.

If a create returns SkuNotAvailable, your region has no capacity for the VM size. Choose a region that has it.

If the deployment fails with RoleDefinitionWithSameNameExists, a second onboarding in the same tenant reused the default role name. Set ROLE_NAME, as the note under ARM shows.

If Terraform stops with Unsupported argument on enable_machine_type_list, your configuration sets a switch the module no longer has. Delete it as A role on your subscription shows, then apply again.

If status.valid is false, Ringleader cannot use the identity. Run rl cloudidentity describe azure -n dev to see why, replacing azure and dev with the CloudIdentity’s name and namespace. The usual causes are a wrong application client id or a mismatch in one of the three values Entra checks.

Next steps