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
{% include 'auth/entra-id/partials/app-access.md' %}
12
+
13
+
### Users
14
+
15
+
{% include 'auth/entra-id/partials/user-access.md' %}
16
+
17
+
### Fine-grained permissions
18
+
9
19
You may define custom permissions for your application in Entra ID and grant them to other consumer applications.
10
20
Permissions will appear as _claims_ in the consumer's token.
11
21
Your application can then use these claims to implement custom authorization logic.
@@ -21,7 +31,7 @@ Your application can then use these claims to implement custom authorization log
21
31
2. The consumer has been granted a custom permission in your access policy definition.
22
32
3. The target _audience_ is your application.
23
33
24
-
### Custom scopes
34
+
####Custom scopes
25
35
26
36
A _scope_ only applies to tokens acquired [on behalf of an employee][obo]
27
37
(service-to-service calls on behalf of an end-user).
@@ -74,7 +84,7 @@ Scopes will appear as a _space separated string_ in the `scp` claim within the u
74
84
}
75
85
```
76
86
77
-
### Custom roles
87
+
#### Custom roles
78
88
79
89
A _role_ only applies to tokens acquired [as an application][m2m] (service-to-service calls).
80
90
@@ -128,28 +138,43 @@ Roles will appear in the `roles` claim as an _array of strings_ within the appli
128
138
129
139
Notable claims in tokens from Entra ID:
130
140
131
-
- `azp`(**authorized party**)
132
-
- The [client ID](../explanations/README.md#client-id) of the application that requested the token (this would be your consumer).
133
-
- `azp_name`(**authorized party name**)
134
-
- The value of this claim is the (human-readable) [name](../explanations/README.md#client-name) of the consumer application that requested the token.
135
-
- `groups`(**groups**)
136
-
- JSON array of [group identifiers](../explanations/README.md#group-identifier) that the user is a member of.
137
-
- Used to implement group-based authorization logic in your application.
138
-
- This claim only applies in flows where a user is involved i.e., either the [login] or [on-behalf-of][obo] flows.
139
-
- In order for a group to appear in the claim, all the following conditions must be true:
140
-
- The given user is a direct member of the group.
141
-
- The group has been [granted access to the application](../how-to/secure.md#users).
142
-
- `idtyp`(**identity type**)
143
-
- This is a special claim used to determine whether a token is a [machine-to-machine][m2m] (app-only) token or a [on-behalf-of][obo] (user) token.
144
-
- The claim currently only appears in machine-to-machine tokens. The value is `app` when the token is a machine-to-machine token.
145
-
- In short: if the `idtyp` claim exists and it has the value `app`, then it is a machine-to-machine token. Otherwise, it is a user/on-behalf-of token.
141
+
`azp`(**authorized party**)
142
+
143
+
: The [client ID](../explanations/README.md#client-id) of the application that requested the token (this would be your consumer).
144
+
145
+
`azp_name`(**authorized party name**)
146
+
147
+
: The value of this claim is the (human-readable) [name](../explanations/README.md#client-name) of the consumer application that requested the token.
148
+
149
+
`groups`
150
+
151
+
: JSON array of [group identifiers](../explanations/README.md#group-identifier) that the user is a member of.
152
+
Used to implement group-based authorization logic in your application.
153
+
154
+
This claim only applies in flows where a user is involved i.e., either the [login] or [on-behalf-of][obo] flows.
155
+
In order for a group to appear in the claim, all the following conditions must be true:
156
+
157
+
- The given user is a direct member of the group.
158
+
- The group has been [granted access to the application](../how-to/secure.md#users).
159
+
160
+
`idtyp`(**identity type**)
161
+
162
+
: This is a special claim used to determine whether a token is a [machine-to-machine][m2m] (app-only) token or a [on-behalf-of][obo] (user) token.
163
+
164
+
Tokens are a machine-to-machine tokens only if this claim exists and has the value `app`.
165
+
146
166
{%- if tenant() == "nav" %}
147
-
- `NAVident`(**NAV ident**)
148
-
- The value of this claim maps to an internal identifier for the employees in NAV.
149
-
- This claim thus only applies in flows where a user is involved i.e., either the [login] or [on-behalf-of][obo] flows.
167
+
168
+
`NAVident`
169
+
170
+
: The internal identifier for the employees in NAV.
171
+
Only applies in flows where a user is involved i.e., either the [login] or [on-behalf-of][obo] flows.
172
+
150
173
{%- endif %}
151
-
- `roles`(**roles**)
152
-
- The value of this claim is an _array of strings_ that lists the roles that the application has access to:
174
+
175
+
`roles`
176
+
177
+
: The value of this claim is an _array of strings_ that lists the roles that the application has access to:
153
178
```json
154
179
{
155
180
"roles": [
@@ -159,19 +184,25 @@ Notable claims in tokens from Entra ID:
159
184
]
160
185
}
161
186
```
162
-
- This claim **only** applies to [machine-to-machine][m2m] tokens.
163
-
- Consumers defined in the [access policy](../how-to/secure.md#applications) are always assigned the default role named `access_as_application`.
164
-
- You can optionally define and grant additional [custom roles](#custom-roles) to consumers.
165
-
- `scp`(**scope**)
166
-
- The value of this claim is a _space-separated string_ that lists the scopes that the application has access to:
187
+
188
+
This claim **only** applies to [machine-to-machine][m2m] tokens.
189
+
190
+
Consumers defined in the [access policy](../how-to/secure.md#applications) are always assigned the default role named `access_as_application`.
191
+
You can optionally define and grant them [custom roles](#custom-roles).
192
+
193
+
`scp`(**scope**)
194
+
195
+
: The value of this claim is a _space-separated string_ that lists the scopes that the application has access to:
167
196
```json
168
197
{
169
198
"scp": "defaultaccess scope1 scope2"
170
199
}
171
200
```
172
-
- This claim **only** applies to user or [on-behalf-of][obo] tokens.
173
-
- Consumers defined in the [access policy](../how-to/secure.md#applications) are always assigned the default scope named `defaultaccess`.
174
-
- You can optionally define and grant additional [custom scopes](#custom-scopes) to consumers.
201
+
202
+
This claim **only** applies to user or [on-behalf-of][obo] tokens.
203
+
204
+
Consumers defined in the [access policy](../how-to/secure.md#applications) are always assigned the default scope named `defaultaccess`.
205
+
You can optionally define and grant them [custom scopes](#custom-scopes).
175
206
176
207
For a complete list of claims, see the [Access Token Claims Reference in Entra ID](https://learn.microsoft.com/en-us/entra/identity-platform/access-token-claims-reference).
Copy file name to clipboardExpand all lines: docs/auth/idporten/how-to/login.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
tags: [idporten, how-to]
3
3
---
4
4
5
-
# Log in a citizen with ID-porten
5
+
# Log in a citizen
6
6
7
7
This how-to guides you through the steps required to ensure that only citizens authenticated with [ID-porten](../README.md) can access your application.
8
8
@@ -75,7 +75,7 @@ Validate that the `aud` claim is equal to the `IDPORTEN_AUDIENCE` environment va
75
75
76
76
**Signature Validation**
77
77
78
-
Validate that the token is signed with a ID-porten's public key published at the JWKS endpoint.
78
+
Validate that the token is signed with a public key published at the JWKS endpoint.
79
79
This endpoint URI can be found in one of two ways:
80
80
81
81
1. the `IDPORTEN_JWKS_URI` environment variable, or
Copy file name to clipboardExpand all lines: docs/auth/idporten/reference/README.md
+7-4
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,13 @@ tags: [idporten, reference]
8
8
9
9
Notable claims in tokens from ID-porten:
10
10
11
-
-`acr` (**Authentication Context Class Reference**)
12
-
- The [security level](#security-levels) used for authenticating the end-user.
13
-
-`pid` (**personidentifikator**)
14
-
- The Norwegian national ID number (fødselsnummer/d-nummer) of the authenticated end user.
11
+
`acr`
12
+
13
+
: The [security level](#security-levels) used when authenticating the end-user.
14
+
15
+
`pid`
16
+
17
+
: "Personidentifikator". The Norwegian national ID number (fødselsnummer/d-nummer) of the authenticated end user.
15
18
16
19
For a complete list of claims, see the [Access Token Reference in ID-porten](https://docs.digdir.no/docs/idporten/oidc/oidc_protocol_access_token#by-value--self-contained-access-token).
0 commit comments