Skip to content

Commit 588b80f

Browse files
authored
Merge branch 'master' into patch-4
2 parents d44c851 + e6ca805 commit 588b80f

File tree

16,678 files changed

+300064
-200252
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

16,678 files changed

+300064
-200252
lines changed

.acrolinx-config.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"
66
## Acrolinx Scorecards
77
8-
**Starting Wednesday, 7/26, a minimum Acrolinx score of 80 will be required for merging PRs that require human review.**
8+
**A minimum Acrolinx score of 80 is required.**
99
1010
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:
1111

.openpublishing.publish.config.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"enable_pull_request_aggregation": true,
77
"branch_target_mapping": {
88
"live": ["Publish", "PDF"],
9-
"master": ["Publish", "PDF"]
9+
"master": ["Publish", "PDF"],
10+
"release-event-grid": ["Publish", "PDF"],
11+
"hd-insight-pdf": ["Publish", "PDF"]
1012
},
1113
"docsets_to_publish": [{
1214
"docset_name": "azure-documents",
@@ -110,6 +112,11 @@
110112
"path_to_root": "samples-mediaservices-encoderstandard",
111113
"url": "https://github.com/Azure-Samples/media-services-dotnet-on-demand-encoding-with-media-encoder-standard",
112114
"branch":"master"
115+
},
116+
{
117+
"path_to_root": "samples-durable-functions",
118+
"url": "https://github.com/Azure/azure-functions-durable-extension",
119+
"branch":"netcore20"
113120
}
114121
]
115122
}

.openpublishing.redirection.json

Lines changed: 8030 additions & 2829 deletions
Large diffs are not rendered by default.

CODEOWNERS

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Testing the new code owners feature in GitHub. Please contact Tyson if you have questions.
22

3-
contributor-guide/* [email protected]
4-
articles/storage/* [email protected]
5-
articles/virtual-machines/* [email protected] [email protected]
6-
articles/virtual-machines/linux/* [email protected] [email protected]
7-
articles/virtual-machines/windows/* [email protected] [email protected]
3+
articles/storage/ @tamram @robinsh
4+
articles/virtual-machines/ @iainfoulds @cynthn
5+
articles/virtual-machines/linux/ @iainfoulds @cynthn
6+
articles/virtual-machines/windows/ @iainfoulds @cynthn
7+
articles/application-insights/ @SergeyKanzhelev
8+
articles/cosmos-db/ @mimig1

articles/active-directory-b2c/TOC.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
## [Configure tokens](active-directory-b2c-token-session-sso.md)
4747
## [Enable MFA](active-directory-b2c-reference-mfa.md)
4848
## [Use custom attributes](active-directory-b2c-reference-custom-attr.md)
49+
## [Customize password](active-directory-b2c-reference-password-complexity.md)
4950
## [Customizing the UI](active-directory-b2c-reference-ui-customization.md)
5051
### [Helper tool for customization](active-directory-b2c-reference-ui-customization-helper-tool.md)
5152
## [Language customization](active-directory-b2c-reference-language-customization.md)
@@ -56,24 +57,34 @@
5657
## [Custom policies](active-directory-b2c-overview-custom.md)
5758
## Guides
5859
### [Get started](active-directory-b2c-get-started-custom.md)
59-
### Configure OIDC providers
60+
### Configure OIDC/OAUTH2 providers
6061
#### [Azure AD](active-directory-b2c-setup-aad-custom.md)
62+
#### [Microsoft Account](active-directory-b2c-custom-setup-msa-idp.md)
63+
#### [Google+](active-directory-b2c-custom-setup-goog-idp.md)
6164
### Configure SAML providers
65+
#### [ADFS](active-directory-b2c-custom-setup-adfs2016-idp.md)
6266
#### [Salesforce](active-directory-b2c-setup-sf-app-custom.md)
6367
### Integrate RESTful APIs
6468
#### [Validate user input](active-directory-b2c-rest-api-validation-custom.md)
6569
#### [Obtain additional claims](active-directory-b2c-rest-api-step-custom.md)
66-
### Customize login
70+
### User flows
6771
#### [Configure user input](active-directory-b2c-configure-signup-self-asserted-custom.md)
6872
#### [Custom attributes](active-directory-b2c-create-custom-attributes-profile-edit-custom.md)
6973
#### [Customize UI](active-directory-b2c-ui-customization-custom.md)
7074
#### [Customize tokens](active-directory-b2c-reference-manage-sso-and-token-configuration.md)
75+
#### [Password complexity](active-directory-b2c-reference-password-complexity-custom.md)
76+
77+
#### [Password change](active-directory-b2c-reference-password-change-custom.md)
78+
79+
#### [Enable keep me signed in](active-directory-b2c-reference-kmsi-custom.md)
80+
7181
### Troubleshooting
7282
#### [Collect logs using Application Insights](active-directory-b2c-troubleshoot-custom.md)
7383
## Reference
7484
### [Release notes](active-directory-b2c-developer-notes-custom.md)
75-
85+
### [Trust Framework definition](active-directory-b2c-reference-trustframeworks-defined-ief-custom.md)
7686
# Reference
87+
## [Code samples](https://azure.microsoft.com/en-us/resources/samples/?service=active-directory-b2c)
7788
## Glossary
7889
### [Types of applications](active-directory-b2c-apps.md)
7990
### [Authentication protocols](active-directory-b2c-reference-protocols.md)
@@ -82,16 +93,18 @@
8293
## [Enable billing](active-directory-b2c-how-to-enable-billing.md)
8394
## [Threat management](active-directory-b2c-reference-threat-management.md)
8495
## [Issues when creating a directory](active-directory-b2c-support-create-directory.md)
96+
## [Extensions app](active-directory-b2c-reference-extensions-app.md)
8597

8698
# Related
8799
## [Azure Active Directory](../active-directory/active-directory-whatis.md)
88100
## [Multi-factor authentication](../multi-factor-authentication/multi-factor-authentication.md)
89101

90102
# Resources
91103
## [Azure AD B2C feedback forum](https://feedback.azure.com/forums/169401-azure-active-directory/category/160596-b2c)
92-
## [Azure Roadmap](https://azure.microsoft.com/roadmap/)
104+
## [Azure Roadmap](https://azure.microsoft.com/roadmap/?category=security-identity)
93105
## [Frequently asked questions](active-directory-b2c-faqs.md)
94106
## [Pricing](https://azure.microsoft.com/pricing/details/active-directory-b2c/)
107+
## [Pricing calculator](https://azure.microsoft.com/pricing/calculator/)
95108
## [Service updates](https://azure.microsoft.com/updates/?product=active-directory-b2c)
96109
## [Stack Overflow](https://stackoverflow.com/questions/tagged/azure-ad-b2c)
97110
## [Support](active-directory-b2c-support.md)
Lines changed: 52 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'Azure Active Directory B2C: Requesting access tokens | Microsoft Docs'
2+
title: 'Requesting access tokens - Azure AD B2C | Microsoft Docs'
33
description: This article will show you how to setup a client application and acquire an access token.
44
services: active-directory-b2c
55
documentationcenter: android
@@ -13,34 +13,57 @@ ms.workload: identity
1313
ms.tgt_pltfrm: na
1414
ms.devlang: na
1515
ms.topic: article
16-
ms.date: 03/16/2017
16+
ms.date: 08/09/2017
1717
ms.author: parakhj
1818

1919
---
20-
# Azure AD B2C: Requesting Access Tokens
20+
# Azure AD B2C: Requesting access tokens
2121

22-
An access token (denoted as **access\_token**) is a form of security token that a client can use to access resources that are secured by an [authorization server](https://docs.microsoft.com/azure/active-directory-b2c/active-directory-b2c-reference-protocols#the-basics), such as a web API. Access tokens are represented as [JWTs](https://docs.microsoft.com/azure/active-directory-b2c/active-directory-b2c-reference-tokens#types-of-tokens) and contain information about the intended resource server and the granted permissions to the server. When calling the resource server, the access token must be present in the HTTP request.
22+
An access token (denoted as **access\_token** in the responses from Azure AD B2C) is a form of security token that a client can use to access resources that are secured by an [authorization server](https://docs.microsoft.com/azure/active-directory-b2c/active-directory-b2c-reference-protocols#the-basics), such as a web API. Access tokens are represented as [JWTs](https://docs.microsoft.com/azure/active-directory-b2c/active-directory-b2c-reference-tokens#types-of-tokens) and contain information about the intended resource server and the granted permissions to the server. When calling the resource server, the access token must be present in the HTTP request.
2323

24-
This article discusses how to configure a client application and have it make a request to acquire an **access\_token** from the `authorize` and `token` endpoints.
24+
This article discusses how to configure a client application and web API in order to obtain an **access\_token**.
2525

2626
> [!NOTE]
2727
> **Web API chains (On-Behalf-Of) is not supported by Azure AD B2C.**
2828
>
29-
> Many architectures include a Web API that needs to call another downstream Web API, both secured by Azure AD B2C. This scenario is common in native clients that have a Web API back end, which in turn calls a Microsoft online service such as the Azure AD Graph API.
29+
> Many architectures include a web API that needs to call another downstream web API, both secured by Azure AD B2C. This scenario is common in native clients that have a web API back end, which in turn calls a Microsoft online service such as the Azure AD Graph API.
3030
>
31-
> This chained Web API scenario can be supported by using the OAuth 2.0 Jwt Bearer Credential grant, otherwise known as the On-Behalf-Of flow. However, the On-Behalf-Of flow is not currently implemented in the Azure AD B2C.
31+
> This chained web API scenario can be supported by using the OAuth 2.0 JWT Bearer Credential grant, otherwise known as the On-Behalf-Of flow. However, the On-Behalf-Of flow is not currently implemented in Azure AD B2C.
3232
33-
## Prerequisite
33+
## Register a web API and publish permissions
3434

35-
Before requesting an access token, you first need to register a web API and publish permissions that can be granted to the client application. Get started by following the steps under the [Register a web API](active-directory-b2c-app-registration.md#register-a-web-api) section.
35+
Before requesting an access token, you first need to register a web API and publish permissions (scopes) that can be granted to the client application.
3636

37-
## Granting permissions to a web API
37+
### Register a web API
3838

39-
In order for a client application to get specific permissions to an API, the client application needs to be granted those permissions via the Azure portal. To grant permissions to a client application:
39+
1. On the Azure AD B2C features menu on the Azure portal, click **Applications**.
40+
1. Click **+Add** at the top of the menu.
41+
1. Enter a **Name** for the application that will describe your application to consumers. For example, you could enter "Contoso API".
42+
1. Toggle the **Include web app / web API** switch to **Yes**.
43+
1. Enter an arbitrary value for the **Reply URLs**. For example, enter `https://localhost:44316/`. The value does not matter since an API should not be receiving the token directly from Azure AD B2C.
44+
1. Enter an **App ID URI**. This is the identifier used for your web API. For example, enter 'notes' in the box. The **App ID URI** would then be `https://{tenantName}.onmicrosoft.com/notes`.
45+
1. Click **Create** to register your application.
46+
1. Click the application that you just created and copy down the globally unique **Application Client ID** that you'll use later in your code.
4047

41-
1. Navigate to the **Applications** menu in the B2C features blade.
42-
1. Register a client application ([web app](active-directory-b2c-app-registration.md#register-a-web-application) or [native client](active-directory-b2c-app-registration.md#register-a-mobilenative-application)) if you don’t have one already.
43-
1. On your application's Settings blade, select **Api access**.
48+
### Publishing permissions
49+
50+
Scopes, which are analogous to permissions, are necessary when your app is calling an API. Some examples of scopes are "read" or "write". Suppose you want your web or native app to "read" from an API. Your app would call Azure AD B2C and request an access token that gives access to the scope "read". In order for Azure AD B2C to emit such an access token, the app needs to be granted permission to "read" from the specific API. To do this, your API first needs to publish the "read" scope.
51+
52+
1. Within the Azure AD B2C **Applications** menu, open the web API application ("Contoso API").
53+
1. Click on **Published scopes**. This is where you define the permissions (scopes) that can be granted to other applications.
54+
1. Add **Scope Values** as necessary (for example, "read"). By default, the "user_impersonation" scope will be defined. You can ignore this if you wish. Enter a description of the scope in the **Scope Name** column.
55+
1. Click **Save**.
56+
57+
> [!IMPORTANT]
58+
> The **Scope Name** is the description of the **Scope Value**. When using the scope, make sure to use the **Scope Value**.
59+
60+
## Grant a native or web app permissions to a web API
61+
62+
Once an API is configured to publish scopes, the client application needs to be granted those scopes via the Azure portal.
63+
64+
1. Navigate to the **Applications** menu in the Azure AD B2C features menu.
65+
1. Register a client application ([web app](active-directory-b2c-app-registration.md#register-a-web-app) or [native client](active-directory-b2c-app-registration.md#register-a-mobile-or-native-app)) if you don’t have one already. If you are following this guide as your starting point, you'll need to register a client application.
66+
1. Click on **API access**.
4467
1. Click on **Add**.
4568
1. Select your web API and the scopes (permissions) you would like to grant.
4669
1. Click **OK**.
@@ -50,13 +73,13 @@ In order for a client application to get specific permissions to an API, the cli
5073
5174
## Requesting a token
5275

53-
To get an access token for a resource application, the client application needs to specify the permissions wanted in the **scope** parameter of the request. For example, to acquire the “read” permission for the resource application that has the App ID URI of `https://contoso.onmicrosoft.com/notes`, the scope would be `https://contoso.onmicrosoft.com/notes/read`. Below is an example of an authorization code request to the `authorize` endpoint.
76+
When requesting an access token, the client application needs to specify the desired permissions in the **scope** parameter of the request. For example, to specify the **Scope Value** “read” for the API that has the **App ID URI** of `https://contoso.onmicrosoft.com/notes`, the scope would be `https://contoso.onmicrosoft.com/notes/read`. Below is an example of an authorization code request to the `/authorize` endpoint.
5477

5578
> [!NOTE]
56-
> At this point, custom domains are not supported along with access tokens. You must use your yourtenantId.onmicrosoft.com domain in the request URL.
79+
> Currently, custom domains are not supported along with access tokens. You must use your tenantName.onmicrosoft.com domain in the request URL.
5780
5881
```
59-
https://login.microsoftonline.com/<yourTenantId>.onmicrosoft.com/oauth2/v2.0/authorize?p=<yourPolicyId>&client_id=<appID_of_your_client_application>&nonce=anyRandomValue&redirect_uri=<redirect_uri_of_your_client_application>&scope=https%3A%2F%2Fcontoso.onmicrosoft.com%2Fnotes%2Fread&response_type=code
82+
https://login.microsoftonline.com/<tenantName>.onmicrosoft.com/oauth2/v2.0/authorize?p=<yourPolicyId>&client_id=<appID_of_your_client_application>&nonce=anyRandomValue&redirect_uri=<redirect_uri_of_your_client_application>&scope=https%3A%2F%2Fcontoso.onmicrosoft.com%2Fnotes%2Fread&response_type=code
6083
```
6184

6285
To acquire multiple permissions in the same request, you can add multiple entries in the single **scope** parameter, separated by spaces. For example:
@@ -73,7 +96,7 @@ URL encoded:
7396
scope=https%3A%2F%2Fcontoso.onmicrosoft.com%2Fnotes%2Fread%20openid%20offline_access
7497
```
7598

76-
You may request more scopes/permissions for a resource than what is granted for your client application. When this is the case, the call will succeed if at least one permission is granted. The resulting **access\_token** will have its “scp” claim populated with only the permissions that were successfully granted.
99+
You may request more scopes (permissions) for a resource than what is granted for your client application. When this is the case, the call will succeed if at least one permission is granted. The resulting **access\_token** will have its “scp” claim populated with only the permissions that were successfully granted.
77100

78101
> [!NOTE]
79102
> We do not support requesting permissions against two different web resources in the same request. This kind of request will fail.
@@ -83,20 +106,25 @@ You may request more scopes/permissions for a resource than what is granted for
83106
The OpenID Connect standard specifies several special “scope” values. The following special scopes represent the permission to “access the user’s profile”:
84107

85108
* **openid**: This requests an ID token
86-
* **offline\_access**: This requests a refresh token (using Auth Code flows).
109+
* **offline\_access**: This requests a refresh token (using [Auth Code flows](active-directory-b2c-reference-oauth-code.md)).
87110

88-
If the “response\_type” parameter in a `authorize` request includes token, the scope parameter must include at least one resource permission (other than openid and “offline\_access”) that will be granted. Otherwise, the `authorize` request will terminate with a failure.
111+
If the `response_type` parameter in a `/authorize` request includes `token`, the `scope` parameter must include at least one resource scope (other than `openid` and `offline_access`) that will be granted. Otherwise, the `/authorize` request will terminate with a failure.
89112

90113
## The returned token
91114

92-
In a successfully minted **access\_token** (from either the `authorize` or `token` endpoint), the following claims will be present:
115+
In a successfully minted **access\_token** (from either the `/authorize` or `/token` endpoint), the following claims will be present:
93116

94117
| Name | Claim | Description |
95118
| --- | --- | --- |
96-
|Audience |`aud` |The \*application ID\* of the single resource that the token grants access to. |
119+
|Audience |`aud` |The **application ID** of the single resource that the token grants access to. |
97120
|Scope |`scp` |The permissions granted to the resource. Multiple granted permissions will be separated by space. |
98-
|Authorized Party |`azp` |The \*application ID\* of the client application that initiated the request. |
121+
|Authorized Party |`azp` |The **application ID** of the client application that initiated the request. |
99122

100123
When your API receives the **access\_token**, it must [validate the token](active-directory-b2c-reference-tokens.md) to prove that the token is authentic and has the correct claims.
101124

102-
We are always open to feedback and suggestions! If you have any difficulties with this topic, or have recommendations for improving this content, we would appreciate your feedback at the bottom of the page. For feature requests, add them to [UserVoice](https://feedback.azure.com/forums/169401-azure-active-directory/category/160596-b2c).
125+
We are always open to feedback and suggestions! If you have any difficulties with this topic, please post on Stack Overflow using the tag ['azure-ad-b2c'](https://stackoverflow.com/questions/tagged/azure-ad-b2c). For feature requests, add them to [UserVoice](https://feedback.azure.com/forums/169401-azure-active-directory/category/160596-b2c).
126+
127+
## Next steps
128+
129+
* Build a web API using [.NET Core](https://github.com/Azure-Samples/active-directory-b2c-dotnetcore-webapi)
130+
* Build a web API using [Node.JS](https://github.com/Azure-Samples/active-directory-b2c-javascript-nodejs-webapi)

0 commit comments

Comments
 (0)