BlogInfrastructure
LiteLLM with Microsoft Entra ID
Connecting LiteLLM to Entra ID takes an app registration, a redirect URI and three settings. After that people sign in to the gateway with their company account, Entra groups become LiteLLM teams, and app roles decide who is an admin. Two things deserve attention before you call it done: single sign-on for more than five users needs the Enterprise licence, and group changes only arrive in LiteLLM when a person signs in again. As of 27 November 2026.
What single sign-on covers
Single sign-on is for people signing in to the gateway's interface, where they see their spend and create keys. It does not change how applications call the gateway. Those still send a virtual key with every request. It is easy to expect the second from the first.
In the open-source version single sign-on is free for up to five users. Beyond that it needs the Enterprise licence, which also brings SCIM provisioning and sign-in for API calls with tokens from your identity provider.
Setting it up
- 1
Register an application in Entra ID
Create an app registration for the gateway and a client secret. Note the client ID and the tenant ID.
- 2
Set the redirect URI
It is the address of your gateway followed by /sso/callback. Use the hostname people will really use, with HTTPS.
- 3
Give the gateway the three values
Client ID, client secret and tenant go into the gateway's environment. The secret belongs in your secret manager.
- 4
Assign groups to the enterprise application
Only groups assigned to the application are read at sign-in. Start with the pilot teams and no more.
MICROSOFT_CLIENT_ID="<client id>" MICROSOFT_CLIENT_SECRET="<client secret>" MICROSOFT_TENANT="<tenant id>" # redirect URI to register in Entra ID https://llm-gateway.example.com/sso/callback
Groups become teams
When someone signs in, LiteLLM reads the groups assigned to the application. For a group it does not know yet, it creates a team with the group's name and the same ID. The person is added to the teams that match their groups. Your directory stays the place where membership is decided.
A team created this way has no budget and no model list unless you set defaults. Do that before the first sign-in, otherwise the first team starts without limits.
litellm_settings:
default_team_params:
max_budget: 100
budget_duration: 30d
models: ["gpt-standard"]Roles from Entra ID
Who is an admin can also come from the directory. You create app roles in the app registration and assign people to them. LiteLLM reads the role from the sign-in token and stores it. If a person has several roles, the highest one counts.
| Role value | Who should get it |
|---|---|
| proxy_admin | The two or three people who run the gateway |
| proxy_admin_viewer | People who need to see everything and change nothing, such as finance or audit |
| internal_user | Everyone who creates their own keys |
| internal_user_viewer | People who should only look at their own usage |
The role of an organisation admin cannot be granted this way. LiteLLM's tutorial says it has to be assigned per organisation inside LiteLLM.
Offboarding needs its own test
Group and team membership is synchronised when a person signs in. The tutorial does not say what happens to someone who is removed from a group and never signs in again, or to the keys they created. That is exactly the case security will ask about, so test it before go-live.
- Remove a test user from a group in Entra ID and check whether their key still works an hour later
- Disable the test user completely and check again
- If keys outlive the account, give personal keys a short lifetime, and look at SCIM provisioning, which LiteLLM supports for Entra ID with the Enterprise licence
- Write the result into the handover document, so the next admin does not have to find out again
Connecting the identity provider and testing these cases is part of our gateway setup work.
Questions
Does LiteLLM support Microsoft Entra ID?
Yes. It supports sign-in with Entra ID, creates teams from assigned groups and reads roles from app roles. SCIM provisioning for Entra ID is supported as well.
Do we need the Enterprise licence for Entra ID sign-in?
For up to five users, no. For more than five users, yes.
When does a change in an Entra group reach LiteLLM?
At the person's next sign-in to the gateway. Until then LiteLLM works with what it stored at the last sign-in.
Related services
LiteLLM gateway
Budgets and access rules for every team's AI use, through a LiteLLM gateway that is hardened, connected to your identity provider and kept up to date.
Azure OpenAI and Bedrock
GPT and Claude on company data, under the cloud contracts you already have: Azure OpenAI and Amazon Bedrock in your own account, with EU processing and one gateway.
More from the blog
Keys, teams and budgets in LiteLLM
A key and budget layout for LiteLLM that works for a pilot of twenty people and still works for five hundred: who gets which kind of key, where budgets belong and how to keep the master key out of daily use.
LiteLLM Enterprise or open source
What the LiteLLM Enterprise licence adds over the open-source gateway, the three situations in which you need it, and what it leaves for you to run.
Azure API Management or LiteLLM
For companies on Azure: what the AI gateway features in Azure API Management cover, where LiteLLM goes further, and a short way to decide between one, the other or both.
Agent secrets and credentials
Where credentials used by agents and model integrations should live, how to give each agent its own identity, how to rotate without breaking running workflows and what to do after a leak.
Talk to an engineer
Bring one piece of work you would like to improve. The call takes 30 minutes and needs no access to your systems or your data.
Booking runs on Google Calendar.

Mickey Graf
Founder and CEO of Cloudsail
Prefer to write first? Leave your email and a few lines. Mickey reads every message himself and replies by email with times for a call.
Look for the draft in your email program
Send it from there, and Mickey replies in person with times for a 30-minute call. If no draft has opened, write to us at miki@cloudsail.com.