@@ -15,121 +15,6 @@ conditional: [tenant, nav]
15
15
16
16
{% include 'auth/entra-id/partials/user-access.md' %}
17
17
18
- ### Fine-grained permissions
19
-
20
- You may define custom permissions for your application in Entra ID and grant them to other consumer applications.
21
- Permissions will appear as _ claims_ in the consumer's token.
22
- Your application can then use these claims to implement custom authorization logic.
23
-
24
- !!! warning
25
-
26
- Custom permissions only apply in the context of _your own application_.
27
- They are _not_ global permissions.
28
-
29
- All the following conditions must be met for the custom permission to appear:
30
-
31
- 1. The token is acquired by a consumer of your application.
32
- 2. The consumer has been granted a custom permission in your access policy definition.
33
- 3. The target _audience_ is your application.
34
-
35
- #### Custom scopes
36
-
37
- A _ scope_ only applies to tokens acquired [ on behalf of an employee] [ obo ] .
38
-
39
- Applications defined in the access policy are always assigned the default scope named ` defaultaccess ` .
40
-
41
- ``` yaml hl_lines="8-10" title="Example configuration"
42
- spec :
43
- accessPolicy :
44
- inbound :
45
- rules :
46
- - application : app-a
47
- namespace : other-namespace
48
- cluster : other-cluster
49
- permissions :
50
- scopes :
51
- - " custom-scope"
52
- ` ` `
53
-
54
- The above configuration grants the application ` app-a` the scope `custom-scope`.
55
-
56
- Scopes will appear as a _space separated string_ in the `scp` claim within the user's token.
57
-
58
- ??? example "Example decoded on-behalf-of token (click to expand)"
59
-
60
- ` ` ` json hl_lines="17"
61
- {
62
- "aud": "8a5...",
63
- "iss": "https://login.microsoftonline.com/.../v2.0",
64
- "iat": 1624957183,
65
- "nbf": 1624957183,
66
- "exp": 1624961081,
67
- "aio": "AXQ...",
68
- "azp": "e37...",
69
- "azpacr": "1",
70
- "groups": [
71
- "2d7..."
72
- ],
73
- "name": "Navnesen, Navn",
74
- "oid": "15c...",
75
- "preferred_username": "[email protected] ",
76
- "rh": "0.AS...",
77
- "scp": "custom-scope defaultaccess",
78
- "sub": "6OC...",
79
- "tid": "623...",
80
- "uti": "i03...",
81
- "ver": "2.0"
82
- }
83
- ` ` `
84
-
85
- # ### Custom roles
86
-
87
- A _role_ only applies to tokens acquired [as an application][m2m] (machine-to-machine calls).
88
-
89
- Applications defined in the access policy are always assigned the default role named `access_as_application`.
90
-
91
- ` ` ` yaml hl_lines="8-10" title="Example configuration"
92
- spec:
93
- accessPolicy:
94
- inbound:
95
- rules:
96
- - application: app-a
97
- namespace: other-namespace
98
- cluster: other-cluster
99
- permissions:
100
- roles:
101
- - "custom-role"
102
- ` ` `
103
-
104
- The above configuration grants the application `app-a` the role `custom-role`.
105
-
106
- Roles will appear in the `roles` claim as an _array of strings_ within the application's token.
107
-
108
- ??? example "Example decoded client credentials token (click to expand)"
109
-
110
- ` ` ` json hl_lines="12-15"
111
- {
112
- "aud": "8a5...",
113
- "iss": "https://login.microsoftonline.com/.../v2.0",
114
- "iat": 1624957347,
115
- "nbf": 1624957347,
116
- "exp": 1624961247,
117
- "aio": "E2Z...",
118
- "azp": "e37...",
119
- "azpacr": "1",
120
- "oid": "933...",
121
- "rh": "0.AS...",
122
- "roles": [
123
- "access_as_application",
124
- "custom-role"
125
- ],
126
- "sub": "933...",
127
- "tid": "623...",
128
- "uti": "kbG...",
129
- "ver": "2.0"
130
- }
131
- ` ` `
132
-
133
18
## Claims
134
19
135
20
Notable claims in tokens from Entra ID.
0 commit comments