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
Copy file name to clipboardExpand all lines: articles/active-directory-b2c/add-web-api-application.md
+4-9Lines changed: 4 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: kengaderdus
6
6
manager: CelesteDG
7
7
8
8
ms.author: kengaderdus
9
-
ms.date: 08/24/2021
9
+
ms.date: 03/30/2022
10
10
ms.custom: mvc
11
11
ms.topic: how-to
12
12
ms.service: active-directory
@@ -15,9 +15,9 @@ ms.subservice: B2C
15
15
16
16
# Add a web API application to your Azure Active Directory B2C tenant
17
17
18
-
Register web API resources in your tenant so that they can accept and respond to requests by client applications that present an access token. This article shows you how to register a web API in Azure Active Directory B2C (Azure AD B2C).
18
+
This article shows you how to register web API resources in your Azure Active Directory B2C (Azure AD B2C) tenant so that they can accept and respond to requests by client applications that present an access token.
19
19
20
-
To register an application in your Azure AD B2C tenant, you can use our new unified **App registrations** experience or our legacy**Applications (Legacy)** experience. [Learn more about the new experience](./app-registrations-training-guide.md).
20
+
To register an application in your Azure AD B2C tenant, you can use Azure portal's new unified **App registrations** experience the legacy **Applications (Legacy)** experience. [Learn more about the new experience](./app-registrations-training-guide.md).
21
21
22
22
#### [App registrations](#tab/app-reg-ga/)
23
23
@@ -31,11 +31,6 @@ To register an application in your Azure AD B2C tenant, you can use our new unif
31
31
1. Select **Register**.
32
32
1. Record the **Application (client) ID** for use in your web API's code.
33
33
34
-
If you have an application that implements the implicit grant flow, for example a [JavaScript-based single-page application (SPA)](tutorial-register-spa.md), you can enable the flow by following these steps:
35
-
36
-
1. Under **Manage**, select **Authentication**.
37
-
1. Under **Implicit grant**, select both the **Access tokens** and **ID tokens** check boxes.
@@ -48,7 +43,7 @@ If you have an application that implements the implicit grant flow, for example
48
43
1. For **Include web app/ web API** and **Allow implicit flow**, select **Yes**.
49
44
1. For **Reply URL**, enter an endpoint where Azure AD B2C should return any tokens that your application requests. In your production application, you might set the reply URL to a value such as `https://localhost:44332`. For testing purposes, set the reply URL to `https://jwt.ms`.
50
45
1. For **App ID URI**, enter the identifier used for your web API. The full identifier URI including the domain is generated for you. For example, `https://contosotenant.onmicrosoft.com/api`.
51
-
1.Click**Create**.
46
+
1.Select**Create**.
52
47
1. On the properties page, record the application ID that you'll use when you configure the web application.
Copy file name to clipboardExpand all lines: articles/active-directory-b2c/application-types.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,14 +9,14 @@ manager: CelesteDG
9
9
ms.service: active-directory
10
10
ms.workload: identity
11
11
ms.topic: conceptual
12
-
ms.date: 06/17/2021
12
+
ms.date: 03/30/2022
13
13
ms.author: kengaderdus
14
14
ms.subservice: B2C
15
15
16
16
---
17
17
# Application types that can be used in Active Directory B2C
18
18
19
-
Azure Active Directory B2C (Azure AD B2C) supports authentication for a variety of modern application architectures. All of them are based on the industry standard protocols [OAuth 2.0](protocols-overview.md) or [OpenID Connect](protocols-overview.md). This article describes the types of applications that you can build, independent of the language or platform you prefer. It also helps you understand the high-level scenarios before you start building applications.
19
+
Azure Active Directory B2C (Azure AD B2C) supports authentication for various modern application architectures. All of them are based on the industry standard protocols [OAuth 2.0](protocols-overview.md) or [OpenID Connect](protocols-overview.md). This article describes the types of applications that you can build, independent of the language or platform you prefer. It also helps you understand the high-level scenarios before you start building applications.
20
20
21
21
Every application that uses Azure AD B2C must be registered in your [Azure AD B2C tenant](tutorial-create-tenant.md) by using the [Azure portal](https://portal.azure.com/). The application registration process collects and assigns values, such as:
22
22
@@ -67,29 +67,31 @@ In a web application, each execution of a [policy](user-flow-overview.md) takes
67
67
68
68
Validation of the `id_token` by using a public signing key that is received from Azure AD is sufficient to verify the identity of the user. This process also sets a session cookie that can be used to identify the user on subsequent page requests.
69
69
70
-
To see this scenario in action, try one of the web application sign-in code samples in our [Getting started section](overview.md).
70
+
To see this scenario in action, try one of the web application signin code samples in our [Getting started section](overview.md).
71
71
72
-
In addition to facilitating simple sign-in, a web server application might also need to access a back-end web service. In this case, the web application can perform a slightly different [OpenID Connect flow](openid-connect.md) and acquire tokens by using authorization codes and refresh tokens. This scenario is depicted in the following [Web APIs section](#web-apis).
72
+
In addition to facilitating simple signin, a web server application might also need to access a back-end web service. In this case, the web application can perform a slightly different [OpenID Connect flow](openid-connect.md) and acquire tokens by using authorization codes and refresh tokens. This scenario is depicted in the following [Web APIs section](#web-apis).
73
73
74
74
## Single-page applications
75
75
Many modern web applications are built as client-side single-page applications ("SPAs"). Developers write them by using JavaScript or a SPA framework such as Angular, Vue, and React. These applications run on a web browser and have different authentication characteristics than traditional server-side web applications.
76
76
77
77
Azure AD B2C provides **two** options to enable single-page applications to sign in users and get tokens to access back-end services or web APIs:
78
78
79
79
### Authorization code flow (with PKCE)
80
-
-[OAuth 2.0 Authorization code flow (with PKCE)](./authorization-code-flow.md). The authorization code flow allows the application to exchange an authorization code for **ID** tokens to represent the authenticated user and **Access** tokens needed to call protected APIs. In addition, it returns **Refresh** tokens that provide long-term access to resources on behalf of users without requiring interaction with those users.
80
+
81
+
[OAuth 2.0 Authorization code flow (with PKCE)](./authorization-code-flow.md) allows the application to exchange an authorization code for **ID** tokens to represent the authenticated user and **Access** tokens needed to call protected APIs. In addition, it returns **Refresh** tokens that provide long-term access to resources on behalf of users without requiring interaction with those users.
81
82
82
83
This is the **recommended** approach. Having limited-lifetime refresh tokens helps your application adapt to [modern browser cookie privacy limitations](../active-directory/develop/reference-third-party-cookies-spas.md), like Safari ITP.
83
84
84
-
To take advantage of this flow, your application can use an authentication library that supports it, like [MSAL.js 2.x](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-browser).
85
+
To take advantage of this flow, your application can use an authentication library that supports it, like [MSAL.js 2.x](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-browser).
-[OAuth 2.0 implicit flow](implicit-flow-single-page-application.md). Some frameworks, like [MSAL.js 1.x](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core), only support the implicit grant flow. The implicit grant flow allows the application to get **ID** and **Access** tokens. Unlike the authorization code flow, implicit grant flow does not return a **Refresh token**.
91
91
92
-
This authentication flow does not include application scenarios that use cross-platform JavaScript frameworks such as Electron and React-Native. Those scenarios require further capabilities for interaction with the native platforms.
92
+
Some libraries, like [MSAL.js 1.x](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core), only support the implicit grant flow or your application is implemented to use implicit flow. In these cases, Azure AD B2C supports the [OAuth 2.0 implicit flow](implicit-flow-single-page-application.md). The implicit grant flow allows the application to get **ID** and **Access** tokens. Unlike the authorization code flow, implicit grant flow doesn't return a **Refresh token**.
93
+
94
+
This authentication flow doesn't include application scenarios that use cross-platform JavaScript frameworks such as Electron and React-Native. Those scenarios require further capabilities for interaction with the native platforms.
93
95
94
96
## Web APIs
95
97
@@ -133,9 +135,9 @@ In this flow, the application executes [policies](user-flow-overview.md) and rec
133
135
134
136
#### Daemons/server-side applications
135
137
136
-
Applications that contain long-running processes or that operate without the presence of a user also need a way to access secured resources such as web APIs. These applications can authenticate and get tokens by using the application's identity (rather than a user's delegated identity) and by using the OAuth 2.0 client credentials flow. Client credential flow is not the same as on-behalf-flow and on-behalf-flow should not be used for server-to-server authentication.
138
+
Applications that contain long-running processes or that operate without the presence of a user also need a way to access secured resources such as web APIs. These applications can authenticate and get tokens by using their identities (rather than a user's delegated identity) and by using the OAuth 2.0 client credentials flow. Client credential flow isn't the same as on-behalf-flow and on-behalf-flow shouldn't be used for server-to-server authentication.
137
139
138
-
Although the OAuth 2.0 client credentials grant flow is not currently directly supported by the Azure AD B2C authentication service, you can set up client credential flow using Azure AD and the Microsoft identity platform /token (https://login.microsoftonline.com/your-tenant-name.onmicrosoft.com/oauth2/v2.0/token) endpoint for an application in your Azure AD B2C tenant. An Azure AD B2C tenant shares some functionality with Azure AD enterprise tenants.
140
+
Although the OAuth 2.0 client credentials grant flow isn't currently directly supported by the Azure AD B2C authentication service, you can set up client credential flow using Azure AD and the Microsoft identity platform /token (https://login.microsoftonline.com/your-tenant-name.onmicrosoft.com/oauth2/v2.0/token) endpoint for an application in your Azure AD B2C tenant. An Azure AD B2C tenant shares some functionality with Azure AD enterprise tenants.
139
141
140
142
To set up client credential flow, see [Azure Active Directory v2.0 and the OAuth 2.0 client credentials flow](../active-directory/develop/v2-oauth2-client-creds-grant-flow.md). A successful authentication results in the receipt of a token formatted so that it can be used by Azure AD as described in [Azure AD token reference](../active-directory/develop/id-tokens.md).
141
143
@@ -145,7 +147,7 @@ For instructions on registering a management application, see [Manage Azure AD B
145
147
146
148
Many architectures include a web API that needs to call another downstream web API, where both are secured by Azure AD B2C. This scenario is common in native clients that have a Web API back-end and calls a Microsoft online service such as the Microsoft Graph API.
147
149
148
-
This chained web API scenario can be supported by using the OAuth 2.0 JWT bearer credential grant, also known as the on-behalf-of flow. However, the on-behalf-of flow is not currently implemented in the Azure AD B2C.
150
+
This chained web API scenario can be supported by using the OAuth 2.0 JWT bearer credential grant, also known as the on-behalf-of flow. However, the on-behalf-of flow isn't currently implemented in the Azure AD B2C.
Copy file name to clipboardExpand all lines: articles/active-directory-b2c/configure-authentication-in-sample-node-web-app-with-api.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ manager: CelesteDG
9
9
ms.service: active-directory
10
10
ms.workload: identity
11
11
ms.topic: how-to
12
-
ms.date: 04/03/2022
12
+
ms.date: 03/30/2022
13
13
ms.author: kengaderdus
14
14
ms.subservice: B2C
15
15
---
@@ -112,7 +112,7 @@ To create the SPA registration, do the following:
112
112
1. Record the secret's **Value** for use in your client application code. This secret value is never displayed again after you leave this page. You use this value as the application secret in your application's code.
113
113
114
114
115
-
### Step 2.5: Grant permissions
115
+
### Step 2.5: Grant API permissions to the web app
Copy file name to clipboardExpand all lines: articles/active-directory-b2c/configure-authentication-sample-angular-spa-app.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ manager: CelesteDG
7
7
ms.service: active-directory
8
8
ms.workload: identity
9
9
ms.topic: how-to
10
-
ms.date: 09/15/2021
10
+
ms.date: 03/30/2022
11
11
ms.author: kengaderdus
12
12
ms.subservice: B2C
13
13
ms.custom: "b2c-support"
@@ -21,11 +21,11 @@ This article uses a sample Angular single-page application (SPA) to illustrate h
21
21
22
22
OpenID Connect (OIDC) is an authentication protocol built on OAuth 2.0 that you can use to securely sign in a user to an application. This Angular sample uses [MSAL Angular](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular) and the [MSAL Browser](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-browser). MSAL is a Microsoft-provided library that simplifies adding authentication and authorization support to Angular SPAs.
23
23
24
-
### Sign-in flow
24
+
### Signin flow
25
25
26
26
The sign-in flow involves the following steps:
27
27
28
-
1. The user opens the app and selects **Sign-in**.
28
+
1. The user opens the app and selects **Signin**.
29
29
1. The app starts an authentication request and redirects the user to Azure AD B2C.
30
30
1. The user [signs up or signs in](add-sign-up-and-sign-in-policy.md) and [resets the password](add-password-reset-policy.md), or signs in with a [social account](add-identity-provider.md).
31
31
1. Upon successful sign-in, Azure AD B2C returns an authorization code to the app. The app takes the following actions:
@@ -49,7 +49,7 @@ The following diagram describes the app registrations and the app architecture.
0 commit comments