Skip to content

Commit 96afcdc

Browse files
committed
link, typo, accuracy, clarity fixes
1 parent dd6968d commit 96afcdc

File tree

3 files changed

+32
-29
lines changed

3 files changed

+32
-29
lines changed

articles/active-directory/develop/access-tokens.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ The `alg` claim indicates the algorithm that was used to sign the token, while t
219219

220220
At any given point in time, Azure AD may sign an ID token using any one of a certain set of public-private key pairs. Azure AD rotates the possible set of keys on a periodic basis, so the application should be written to handle those key changes automatically. A reasonable frequency to check for updates to the public keys used by Azure AD is every 24 hours.
221221

222-
Acquire the signing key data necessary to validate the signature by using the [OpenID Connect metadata document](v2-protocols-oidc.md#fetch-the-openid-connect-metadata-document) located at:
222+
Acquire the signing key data necessary to validate the signature by using the [OpenID Connect metadata document](v2-protocols-oidc.md#fetch-the-openid-configuration-document) located at:
223223

224224
```
225225
https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration

articles/active-directory/develop/active-directory-claims-mapping.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ else
402402
```
403403

404404
#### Validate token signing key
405-
Apps that have claims mapping enabled must validate their token signing keys by appending `appid={client_id}` to their [OpenID Connect metadata requests](v2-protocols-oidc.md#fetch-the-openid-connect-metadata-document). Below is the format of the OpenID Connect metadata document you should use:
405+
Apps that have claims mapping enabled must validate their token signing keys by appending `appid={client_id}` to their [OpenID Connect metadata requests](v2-protocols-oidc.md#fetch-the-openid-configuration-document). Below is the format of the OpenID Connect metadata document you should use:
406406

407407
```
408408
https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration?appid={client-id}

articles/active-directory/develop/v2-protocols-oidc.md

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This diagram shows the basic OpenID Connect sign-in flow. The steps in the flow
2828

2929
## Enable ID tokens
3030

31-
The *ID token* introduced by OpenID Connect is issued by the authorization server (the Microsoft identity platform) when the client application requests one during user authentication. The ID token enables a client application to verify the identity of user and to get other information (claims) about the user.
31+
The *ID token* introduced by OpenID Connect is issued by the authorization server (the Microsoft identity platform) when the client application requests one during user authentication. The ID token enables a client application to verify the identity of the user and to get other information (claims) about them.
3232

3333
ID tokens aren't issued by default for an application registered with the Microsoft identity platform. Enable ID tokens for an app by using one of the following methods.
3434

@@ -44,17 +44,17 @@ Or:
4444

4545
If you forget to enable ID tokens for your app and you request one, the Microsoft identity platform returns an `unsupported_response` error similar to:
4646

47-
*The provided value for the input parameter 'response_type' isn't allowed for this client. Expected value is 'code'*.
47+
> *The provided value for the input parameter 'response_type' isn't allowed for this client. Expected value is 'code'*.
4848
49-
Requesting an ID token by specifying a `response_type` of `id_token` is explained in the [Send the sign-in request](#send-the-sign-in-request) later in the article.
49+
Requesting an ID token by specifying a `response_type` of `id_token` is explained in [Send the sign-in request](#send-the-sign-in-request) later in the article.
5050

51-
## Fetch the OpenID Connect discovery document
51+
## Fetch the OpenID configuration document
5252

53-
OpenID Connect providers like the Microsoft identity platform offer an endpoint for the [discovery of OIDC metadata](https://openid.net/specs/openid-connect-discovery-1_0.html) for that provider. Client applications can use the information in metadata document to find URLs to use for authentication and the authentication service's public signing keys. It's more common (and recommended) to use an authentication library that handles working with the OpenID Connect discovery document for you than writing the code to do so.
53+
OpenID providers like the Microsoft identity platform provide an [OpenID Provider Configuration Document](https://openid.net/specs/openid-connect-discovery-1_0.html) at a publicly accessible endpoint containing the provider's OIDC endpoints, supported claims, and other metadata. Client applications can use the metadata to discover the URLs to use for authentication and the authentication service's public signing keys, among other things. It's more common (and recommended) to use an existing authentication library in your app for working with the OpenID Connect configuration document than hand-coding the requests and response handling in your application.
5454

55-
Every app registration in Azure AD includes a publicly accessible OIDC discovery document URI. To determine the URI your app can use to get most of the information it needs to sign in users and request ID tokens, append the _discovery document path_ to your app registration's _authority URL_.
55+
Every app registration in Azure AD is provided a publicly accessible endpoint and URI that serves its OpenID configuration document. To determine the OpenID configuration document URI for your app, append the configuration document path to your app registration's _authority URL_.
5656

57-
* Discovery document path: `/.well-known/openid-configuration`
57+
* Configuration document path: `/.well-known/openid-configuration`
5858
* Authority URL: `https://login.microsoftonline.com/{tenant}/v2.0`
5959

6060
The value of `{tenant}` varies based on the application's sign-in audience as shown in the following table. The authority URL also varies by [cloud instance](authentication-national-cloud.md#azure-ad-authentication-endpoints).
@@ -66,28 +66,28 @@ The value of `{tenant}` varies based on the application's sign-in audience as sh
6666
| `consumers` |Only users with a personal Microsoft account can sign in to the application. |
6767
| `8eaef023-2b34-4da1-9baa-8bc8c9d6a490` or `contoso.onmicrosoft.com` | Only users from a specific Azure AD tenant (either members of the directory with a work or school account or guests in the directory with a personal Microsoft account) can sign in to the application. <br/><br/>The value can be the domain name of the Azure AD tenant or the tenant ID in GUID format. You can also use the consumer tenant GUID, `9188040d-6c67-4c5b-b112-36a304b66dad`, in place of `consumers`. |
6868

69-
You can also find your app's OpenID discovery document URI its app registration in the Azure portal.
69+
You can also find your app's OpenID configuration document URI in its app registration in the Azure portal.
7070

71-
To find the OIDC discovery document for your app, navigate to the [Azure portal](https://portal.azure.com) and then:
71+
To find the OIDC configuration document for your app, navigate to the [Azure portal](https://portal.azure.com) and then:
7272

7373
1. Select **Azure Active Directory** > **App registrations** > *\<your application\>* > **Endpoints**.
7474
1. Locate the URI under **OpenID Connect metadata document**.
7575

7676
### Sample request
7777

78-
This request gets the OpenID Connect discovery metadata from the `common` authority's OIDC discovery document endpoint on the Azure public cloud:
78+
This request gets the OpenID configuration metadata from the `common` authority's OpenID configuration document endpoint on the Azure public cloud:
7979

8080
```http
8181
GET /common/v2.0/.well-known/openid-configuration
8282
Host: login.microsoftonline.com
8383
```
8484

8585
> [!TIP]
86-
> Try it! To see the OIDC discovery document for the `common` authority, navigate to[https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration](https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration).
86+
> Try it! To see the OpenID configuration document for an application's `common` authority, navigate to[https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration](https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration).
8787
8888
### Sample response
8989

90-
The discovery metadata is returned in JSON format as shown in following example (truncated for brevity). The metadata returned in the JSON response is described in detail in the [OpenID Connect 1.0 discovery specification](https://openid.net/specs/openid-connect-discovery-1_0.html#rfc.section.4.2).
90+
The configuration metadata is returned in JSON format as shown in the following example (truncated for brevity). The metadata returned in the JSON response is described in detail in the [OpenID Connect 1.0 discovery specification](https://openid.net/specs/openid-connect-discovery-1_0.html#rfc.section.4.2).
9191

9292
```json
9393
{
@@ -200,54 +200,57 @@ The following table describes error codes that can be returned in the `error` pa
200200

201201
Receiving an ID token in your app might not always be sufficient to fully authenticate the user. You might also need to validate the ID token's signature and verify its claims per your app's requirements. Like all OpenID providers, the Microsoft identity platform's ID tokens are [JSON Web Tokens (JWTs)](https://tools.ietf.org/html/rfc7519) signed by using public key cryptography.
202202

203-
Not all apps benefit from validating the ID token, however. Native and single-page apps (SPAs), for example, rarely benefit from validating the ID token. Someone with physical access to the device (or browser) can bypass the validation in several ways: by editing the web traffic to the device to provide fake tokens and keys or by debugging the application to skip the validation logic. On the other hand, web apps and web APIs using an ID token for authorization must validate the ID token because they're gating access to data.
203+
Web apps and web APIs that use ID tokens for authorization must validate them because such applications gate access to data. Other types of application might not benefit from ID token validation, however. Native and single-page apps (SPAs), for example, rarely benefit from ID token validation because any entity with physical access to the device or browser can potentially bypass the validation. Methods of token validation bypass include providing fake tokens or keys by modifying network traffic to the device and by debugging the application and stepping over the validation logic during program execution.
204204

205205
If you need or choose to validate ID tokens in your application, we recommend not doing so manually, and instead using a library to parse and validate the tokens. Token validation libraries are available for most development languages, frameworks, and platforms.
206206

207207
### What to validate in an ID token
208208

209-
In addition to validating the signature of the ID token, you should validate several of its claims as described in our [ID token reference](id-tokens.md) article and its [Validating an ID token](id-tokens.md#validating-an-id-token) section. Also see [Important information about signing key-rollover](active-directory-signing-key-rollover.md).
209+
In addition to validating ID token's signature, you should validate several of its claims as described in the [ID token reference](id-tokens.md) article and its [Validating an ID token](id-tokens.md#validating-an-id-token) section. Also see [Important information about signing key-rollover](active-directory-signing-key-rollover.md).
210210

211-
Other common ID token validations vary by application scenario, including:
211+
Several other validations are common and vary by application scenario, including:
212212

213213
* Ensuring the user/organization has signed up for the app.
214214
* Ensuring the user has proper authorization/privileges
215215
* Ensuring a certain strength of authentication has occurred, such as [multi-factor authentication](../authentication/concept-mfa-howitworks.md).
216216

217-
Once you've validated the ID token, you can begin a session with the user and use the claims in the ID token to obtain information about the user in your app. This information can be used for display, records, personalization, etc.
217+
Once you've validated the ID token, you can begin a session with the user and use the information in the token's claims for app personalization, display, or for storing their data.
218218

219219
## Protocol diagram: Access token acquisition
220220

221-
Many applications need not only to sign in a user, but also access a web API on behalf of the user by using OAuth 2.0. If your app uses the authorization code grant type, this scenario combines OpenID Connect for user authentication and getting an access token for a protected resource (typically a web API) by using an OAuth 2.0 authorization code.
221+
Many applications need not only to sign in a user, but also access a web API on behalf of the user. If your app uses the OAuth 2.0 authorization code grant type, this scenario combines OpenID Connect for user authentication and the auth code flow for getting an access token for a protected resource (typically a web API).
222222

223-
The full OpenID Connect sign-in and token acquisition flow looks similar to the next diagram. We describe each step in detail in the next sections of the article.
223+
The full OpenID Connect sign-in and token acquisition flow looks similar to this diagram:
224224

225225
![OpenID Connect protocol: Token acquisition](./media/v2-protocols-oidc/convergence-scenarios-webapp-webapi.svg)
226226

227-
## Get an access token to call UserInfo
227+
## Get an access token for the UserInfo endpoint
228228

229229
In addition to the ID token, the authenticated user's information is also made available at the OIDC [UserInfo endpoint](userinfo.md).
230230

231-
To acquire a token for the OIDC UserInfo endpoint, modify the sign-in request:
231+
To acquire a an access token for the OIDC UserInfo endpoint, modify the sign-in request as described here:
232232

233233
```HTTP
234234
// Line breaks are for legibility only.
235235
236236
GET https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize?
237-
client_id=6731de76-14a6-49ae-97bc-6eba6914391e // Your registered Application ID
238-
&response_type=id_token%20token // this will return both an ID token and an access token
239-
&redirect_uri=http%3A%2F%2Flocalhost%2Fmyapp%2F // Your registered redirect URI, URL encoded
237+
client_id=6731de76-14a6-49ae-97bc-6eba6914391e // Your app registration's Application (client) ID
238+
&response_type=id_token%20token // Requests both an ID token and access token
239+
&redirect_uri=http%3A%2F%2Flocalhost%2Fmyapp%2F // Your application's redirect URI (URL-encoded)
240240
&response_mode=form_post // 'form_post' or 'fragment'
241-
&scope=openid+profile+email // `openid` is required. `profile` and `email` provide additional information in the UserInfo endpoint the same way they do in an ID token.
242-
&state=12345 // Any value, provided by your app
243-
&nonce=678910 // Any value, provided by your app
241+
&scope=openid+profile+email // 'openid' is required; 'profile' and 'email' provide additional information in the UserInfo endpoint the same way they do in an ID token.
242+
&state=12345 // Any value - provided by your app
243+
&nonce=678910 // Any value - provided by your app
244244
```
245245

246-
You can also use the [authorization code flow](v2-oauth2-auth-code-flow.md), the [device code flow](v2-oauth2-device-code.md), or a [refresh token](v2-oauth2-auth-code-flow.md#refresh-the-access-token) in place of `response_type=token` to get a token for your app.
246+
You can use the [authorization code flow](v2-oauth2-auth-code-flow.md), the [device code flow](v2-oauth2-device-code.md), or a [refresh token](v2-oauth2-auth-code-flow.md#refresh-the-access-token) in place of `response_type=token` to get an access token for your app.
247247

248+
<!-- UNCOMMENT WHEN/IF THE TEST APP REGISTRATION IS RE-ENABLED -->
249+
<!--
248250
> [!TIP]
249251
> Click the following link to execute this request. After you sign in, your browser is redirected to `https://localhost/myapp/`, with an ID token and a token in the address bar. Note that this request uses `response_mode=fragment` for demonstration purposes only - for a webapp we recommend using `form_post` for additional security where possible.
250252
> <a href="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=6731de76-14a6-49ae-97bc-6eba6914391e&response_type=id_token%20token&redirect_uri=http%3A%2F%2Flocalhost%2Fmyapp%2F&response_mode=fragment&scope=openid+profile+email&state=12345&nonce=678910" target="_blank">https://login.microsoftonline.com/common/oauth2/v2.0/authorize...</a>
253+
-->
251254

252255
### Successful token response
253256

0 commit comments

Comments
 (0)