You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/my-website/docs/proxy/admin_ui_sso.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,23 @@ MICROSOFT_TENANT="5a39737
81
81
http://localhost:4000/sso/callback
82
82
```
83
83
84
+
**Using App Roles for User Permissions**
85
+
86
+
You can assign user roles directly from Entra ID using App Roles. LiteLLM will automatically read the app roles from the JWT token and assign the corresponding role to the user.
87
+
88
+
Supported roles:
89
+
- `proxy_admin` - Admin over the platform
90
+
- `proxy_admin_viewer` - Can login, view all keys, view all spend (read-only)
91
+
- `internal_user` - Normal user. Can login, view spend and depending on team-member permissions - view/create/delete their own keys.
92
+
93
+
94
+
To set up app roles:
95
+
1. Navigate to your App Registration on https://portal.azure.com/
96
+
2. Go to "App roles" and create a new app role
97
+
3. Use one of the supported role names above (e.g., `proxy_admin`)
98
+
4. Assign users to these roles in your Enterprise Application
99
+
5. When users sign in via SSO, LiteLLM will automatically assign them the corresponding role
## 4. Using Entra ID App Roles for User Permissions
144
+
145
+
You can assign user roles directly from Entra ID using App Roles. LiteLLM will automatically read the app roles from the JWT token during SSO sign-in and assign the corresponding role to the user.
146
+
147
+
### 4.1 Supported Roles
148
+
149
+
LiteLLM supports the following app roles (case-insensitive):
150
+
151
+
- `proxy_admin`- Admin over the entire LiteLLM platform
152
+
- `proxy_admin_viewer`- Read-only admin access (can view all keys and spend)
153
+
- `org_admin`- Admin over a specific organization (can create teams and users within their org)
154
+
- `internal_user`- Standard user (can create/view/delete their own keys and view their own spend)
155
+
156
+
### 4.2 Create App Roles in Entra ID
157
+
158
+
1. Navigate to your App Registration on https://portal.azure.com/
159
+
2. Go to **App roles** > **Create app role**
160
+
161
+
3. Configure the app role:
162
+
- **Display name**: Proxy Admin (or your preferred display name)
163
+
- **Value**: `proxy_admin` (use one of the supported role values above)
164
+
- **Description**: Administrator access to LiteLLM proxy
165
+
- **Allowed member types**: Users/Groups
166
+
167
+
168
+
4. Click **Apply** to save the role
169
+
170
+
### 4.3 Assign Users to App Roles
171
+
172
+
1. Navigate to **Enterprise Applications** on https://portal.azure.com/
173
+
2. Select your LiteLLM application
174
+
3. Go to **Users and groups** > **Add user/group**
175
+
4. Select the user and assign them to one of the app roles you created
176
+
177
+
178
+
### 4.4 Test the Role Assignment
179
+
180
+
1. Sign in to LiteLLM UI via SSO as a user with an assigned app role
181
+
2. LiteLLM will automatically extract the app role from the JWT token
182
+
3. The user will be assigned the corresponding LiteLLM role in the database
183
+
4. The user's permissions will reflect their assigned role
184
+
185
+
**How it works:**
186
+
- When a user signs in via Microsoft SSO, LiteLLM extracts the `roles` claim from the JWT `id_token`
187
+
- If any of the roles match a valid LiteLLM role (case-insensitive), that role is assigned to the user
188
+
- If multiple roles are present, LiteLLM uses the first valid role it finds
189
+
- This role assignment persists in the LiteLLM database and determines the user's access level
190
+
143
191
## Video Walkthrough
144
192
145
193
This walks through setting up sso auto-add for **Microsoft Entra ID**
0 commit comments