Skip to content

Commit 2cfc5c5

Browse files
committed
docs: locking down on roles
1 parent 1aa45f3 commit 2cfc5c5

File tree

7 files changed

+23
-0
lines changed

7 files changed

+23
-0
lines changed

docs/docs/usage-and-faq/locking_down_on_roles.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,29 @@ title: Locking down on roles
33
sidebar_position: 3
44
---
55

6+
## Azure setup
7+
Go to your application registration, click `Groups`:
8+
![manifest](../../static/img/usage-and-faq/role_1.png)
9+
10+
Create a role:
11+
![manifest](../../static/img/usage-and-faq/role_2.png)
12+
13+
Go to Overview and click the Enterprise application link:
14+
![manifest](../../static/img/usage-and-faq/role_3.png)
15+
16+
Go to `Users and groups` and add a user/group:
17+
![manifest](../../static/img/usage-and-faq/role_4.png)
18+
19+
Add the user/group that you want to have this role (if you use a group, the users must be a direct member of that group. Nested membership does not work):
20+
![manifest](../../static/img/usage-and-faq/role_5.png)
21+
22+
Click `select role` and assign the user/role to your application role:
23+
![manifest](../../static/img/usage-and-faq/role_6.png)
24+
25+
Finish by clicking `Assign`. The user will now have that group in their token.
26+
27+
## App code
28+
629
You can lock down on roles by creating your own wrapper dependency:
730

831
```python title="dependencies.py"
51.7 KB
Loading
39.2 KB
Loading
99.6 KB
Loading
46.3 KB
Loading
78.3 KB
Loading
32.5 KB
Loading

0 commit comments

Comments
 (0)