Skip to content

Getting Started

Overview

This guide walks you through connecting an Azure tenant to Britive and granting your first just-in-time Azure RBAC role assignment — no standing permissions, full audit trail on every checkout.

What you’ll accomplish:

  • Register a Britive enterprise application in Azure Active Directory
  • Grant required API permissions and assign the integration role
  • Onboard the Azure application in the Britive console
  • Create an access profile for an Azure role assignment
  • Check out and verify JIT access end-to-end

How It Works

Britive registers as an enterprise application in Azure AD and uses the Microsoft Graph API and Azure RBAC API to manage role assignments. At checkout, Britive creates a scoped role assignment for the user. At checkin (or on expiry), the assignment is deleted — no standing access remains.

User → Britive Console → Microsoft Graph API → Azure RBAC role assignment (scoped, timed) → Deleted on checkin

Before You Begin

  • Britive tenant with administrator access
  • Azure Global Administrator or Application Administrator access to register enterprise applications
  • An Azure subscription to protect with JIT access
  • Azure CLI installed (az login)

Never hardcode credentials. Use environment variables, your secret manager, or the Britive Secrets Store.


Step 1 — Register Britive in Azure AD

Britive needs an app registration in Azure AD to authenticate to the Microsoft Graph and Azure RBAC APIs.

Python Automation

The azure_setup.py script registers the Britive application in Azure AD and assigns a custom role at the Tenant Root Group level, giving Britive the permissions it needs to manage role assignments across all subscriptions.

git clone https://github.com/britive/onboarding.git
cd onboarding
pip3 install -r requirements.txt

Authenticate with Azure:

az login

Set required environment variables:

export AZURE_TENANT_ID=your-tenant-id
export BRITIVE_TENANT=your-tenant
export BRITIVE_API_TOKEN=your-api-token

BRITIVE_TENANT takes just the subdomain (not AZURE_TENANT_ID, which is a separate Azure identifier) — see Finding Your Tenant Name.

Run the setup script:

python python/azure/azure_setup.py

The script outputs the Application (client) ID and client secret — copy these, you’ll need them to register Azure in Britive.


Step 2 — Register Azure in Britive

After the app registration is complete, connect your Azure tenant to Britive.

Add the application

In the Britive console, go to Applications → Add Application → Azure. Enter:

FieldValue
Tenant IDYour Azure AD tenant ID
Client IDThe application (client) ID from the app registration
Client SecretThe secret created in Step 1

Click Save.

Wait for the initial scan

Britive scans Azure to import your subscriptions and available role definitions. This takes 1–3 minutes. The application status changes to Connected when complete.

For detailed onboarding reference, see the Britive documentation and the britive/onboarding repository.


Create Your First Access Profile

An access profile defines which Azure role definitions a group of users can check out, at what scope, and for how long.

Using the Britive Console

Open the Azure application

Navigate to Applications → select your Azure application → ProfilesAdd Profile.

Configure the profile

FieldValue
NameA descriptive name (e.g., DevOps-Contributor)
EnvironmentSelect the Azure subscription
ExpirationMax session duration (e.g., 1h0m0s)

Add permissions

Under Permissions, add the Azure role definitions to grant on checkout (e.g., Contributor, Reader).

Add a policy

Under Policies, click Add Policy. Assign members (users or tags) and set any approval or time-of-access conditions.

Save and activate

Click Save. The profile appears in My Access for assigned members.


Verify

Check out the profile

Navigate to My Access → find your profile → click Check Out.

Confirm the role assignment in Azure

az role assignment list \
  --assignee <your-user-object-id> \
  --subscription <subscription-id> \
  --output table

You should see a Contributor (or whichever role you added) assignment for your user.

Check in

Return to My Access → click Check In. Re-run the az role assignment list command — the assignment should no longer appear.


Troubleshoot

SymptomLikely causeFix
Application shows “Disconnected”Client secret expired or entered incorrectlyRegenerate the secret in Azure AD and update it in Britive
Checkout fails with AuthorizationFailedUser Access Administrator role not assigned to the Britive appAssign the role at the correct scope (subscription or management group)
Subscriptions not visible after scanBritive app lacks Reader access at management group levelGrant Reader on the root management group to the Britive app
Role assignment not deleted after checkinBritive app lacks write permissions on that subscriptionVerify User Access Administrator is assigned at the correct scope
python azure_setup.py fails on role assignmentInsufficient privileges for the logged-in accountLog in with a Global Administrator or Privileged Role Administrator account

Next Steps

Last updated on