Skip to content

Commit 92156e6

Browse files
committed
Move INCLUDES file and add to articles
1 parent a254e44 commit 92156e6

17 files changed

+41
-13
lines changed

aspnetcore/blazor/hybrid/security/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,16 @@ WPF apps use the [Microsoft identity platform](/entra/identity-platform/) to int
5656
* [Quickstart: Set up sign in for a desktop app using Azure Active Directory B2C](/azure/active-directory-b2c/quickstart-native-app-desktop)
5757
* [Configure authentication in a sample WPF desktop app by using Azure AD B2C](/azure/active-directory-b2c/configure-authentication-sample-wpf-desktop-app)
5858

59+
[!INCLUDE[](~/includes/azure-active-directory-b2c-eol-support-notice.md)]
60+
5961
:::zone-end
6062

6163
:::zone pivot="winforms"
6264

6365
Windows Forms apps use the [Microsoft identity platform](/entra/identity-platform/) to integrate with Microsoft Entra (ME-ID) and AAD B2C. For more information, see [Overview of the Microsoft Authentication Library (MSAL)](/entra/identity-platform/msal-overview).
6466

67+
[!INCLUDE[](~/includes/azure-active-directory-b2c-eol-support-notice.md)]
68+
6569
:::zone-end
6670

6771
## Create a custom `AuthenticationStateProvider` without user change updates
@@ -594,12 +598,16 @@ WPF apps use the [Microsoft identity platform](/entra/identity-platform/) to int
594598
* [Quickstart: Set up sign in for a desktop app using Azure Active Directory B2C](/azure/active-directory-b2c/quickstart-native-app-desktop)
595599
* [Configure authentication in a sample WPF desktop app by using Azure AD B2C](/azure/active-directory-b2c/configure-authentication-sample-wpf-desktop-app)
596600

601+
[!INCLUDE[](~/includes/azure-active-directory-b2c-eol-support-notice.md)]
602+
597603
:::zone-end
598604

599605
:::zone pivot="winforms"
600606

601607
Windows Forms apps use the [Microsoft identity platform](/entra/identity-platform/) to integrate with Microsoft Entra (ME-ID) and AAD B2C. For more information, see [Overview of the Microsoft Authentication Library (MSAL)](/entra/identity-platform/msal-overview).
602608

609+
[!INCLUDE[](~/includes/azure-active-directory-b2c-eol-support-notice.md)]
610+
603611
:::zone-end
604612

605613
## Create a custom `AuthenticationStateProvider` without user change updates

aspnetcore/blazor/security/blazor-web-app-with-entra.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ zone_pivot_groups: blazor-web-app-entra-specification
1616
[!INCLUDE[](~/includes/not-latest-version.md)]
1717
-->
1818

19+
[!INCLUDE[](~/includes/azure-active-directory-b2c-eol-support-notice.md)]
20+
1921
This article describes how to secure a Blazor Web App with [Microsoft identity platform](/entra/identity-platform/) with [Microsoft Identity Web packages](/entra/msal/dotnet/microsoft-identity-web/) for [Microsoft Entra ID](https://www.microsoft.com/security/business/microsoft-entra) using a sample app.
2022

2123
:::zone pivot="non-bff-pattern"
@@ -972,7 +974,7 @@ For more information on how this app secures its weather data, see [Secure data
972974
* [Microsoft identity platform documentation](/entra/identity-platform/)
973975
* [Web API documentation | Microsoft identity platform](/entra/identity-platform/index-web-api)
974976
* [A web API that calls web APIs: Call an API: Option 2: Call a downstream web API with the helper class](/entra/identity-platform/scenario-web-api-call-api-call-api?tabs=aspnetcore#option-2-call-a-downstream-web-api-with-the-helper-class)
975-
* [`AzureAD/microsoft-identity-web` GitHub repository](https://github.com/AzureAD/microsoft-identity-web/wiki): Helpful guidance on implementing Microsoft Identity Web for Microsoft Entra ID and Azure Active Directory B2C for ASP.NET Core apps, including links to sample apps and related Azure documentation. Currently, Blazor Web Apps aren't explicitly addressed by the Azure documentation, but the setup and configuration of a Blazor Web App for ME-ID and Azure hosting is the same as it is for any ASP.NET Core web app.
977+
* [`AzureAD/microsoft-identity-web` GitHub repository](https://github.com/AzureAD/microsoft-identity-web/wiki): Helpful guidance on implementing Microsoft Identity Web for Microsoft Entra ID for ASP.NET Core apps, including links to sample apps and related Azure documentation. Currently, Blazor Web Apps aren't explicitly addressed by the Azure documentation, but the setup and configuration of a Blazor Web App for ME-ID and Azure hosting is the same as it is for any ASP.NET Core web app.
976978
* [`AuthenticationStateProvider` service](xref:blazor/security/index#authenticationstateprovider-service)
977979
* [Manage authentication state in Blazor Web Apps](xref:blazor/security/index#manage-authentication-state-in-blazor-web-apps)
978980
* [Service abstractions in Blazor Web Apps](xref:blazor/call-web-api#service-abstractions-for-web-api-calls)

aspnetcore/blazor/security/blazor-web-app-with-oidc.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ zone_pivot_groups: blazor-web-app-oidc-specification
1313

1414
[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]
1515

16+
[!INCLUDE[](~/includes/azure-active-directory-b2c-eol-support-notice.md)]
17+
1618
This article describes how to secure a Blazor Web App with [OpenID Connect (OIDC)](https://openid.net/developers/how-connect-works/) using a sample app in the [`dotnet/blazor-samples` GitHub repository (.NET 8 or later)](https://github.com/dotnet/blazor-samples) ([how to download](xref:blazor/fundamentals/index#sample-apps)).
1719

1820
:::zone pivot="non-bff-pattern"
1921

2022
:::moniker range=">= aspnetcore-9.0"
2123

22-
For Microsoft Entra ID or Azure AD B2C, you can use <xref:Microsoft.Identity.Web.AppBuilderExtension.AddMicrosoftIdentityWebApp%2A> from [Microsoft Identity Web](/entra/msal/dotnet/microsoft-identity-web/) ([`Microsoft.Identity.Web` NuGet package](https://www.nuget.org/packages/Microsoft.Identity.Web), [API documentation](<xref:Microsoft.Identity.Web?displayProperty=fullName>)), which adds both the OIDC and Cookie authentication handlers with the appropriate defaults. The sample app and the guidance in this article don't use Microsoft Identity Web. The guidance demonstrates how to configure the OIDC handler *manually* for any OIDC provider. For more information on implementing Microsoft Identity Web, see <xref:blazor/security/blazor-web-app-entra>.
24+
For Microsoft Entra ID, you can use <xref:Microsoft.Identity.Web.AppBuilderExtension.AddMicrosoftIdentityWebApp%2A> from [Microsoft Identity Web](/entra/msal/dotnet/microsoft-identity-web/) ([`Microsoft.Identity.Web` NuGet package](https://www.nuget.org/packages/Microsoft.Identity.Web), [API documentation](<xref:Microsoft.Identity.Web?displayProperty=fullName>)), which adds both the OIDC and Cookie authentication handlers with the appropriate defaults. The sample app and the guidance in this article don't use Microsoft Identity Web. The guidance demonstrates how to configure the OIDC handler *manually* for any OIDC provider. For more information on implementing Microsoft Identity Web, see <xref:blazor/security/blazor-web-app-entra>.
2325

2426
:::moniker-end
2527

@@ -368,7 +370,7 @@ oidcOptions.RemoteSignOutPath = new PathString("/signout-oidc");
368370

369371
(*Microsoft Azure only with the "common" endpoint*) <xref:Microsoft.IdentityModel.Tokens.TokenValidationParameters.IssuerValidator%2A?displayProperty=nameWithType>: Many OIDC providers work with the default issuer validator, but we need to account for the issuer parameterized with the Tenant ID (`{TENANT ID}`) returned by `https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration`. For more information, see [SecurityTokenInvalidIssuerException with OpenID Connect and the Azure AD "common" endpoint (`AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet` #1731)](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/1731).
370372

371-
Only for apps using Microsoft Entra ID or Azure AD B2C with the "common" endpoint:
373+
Only for apps using Microsoft Entra ID with the "common" endpoint:
372374

373375
```csharp
374376
var microsoftIssuerValidator = AadIssuerValidator.GetAadIssuerValidator(oidcOptions.Authority);
@@ -401,7 +403,7 @@ The sample app only provides a user name and email for display purposes.
401403

402404
:::moniker range=">= aspnetcore-9.0"
403405

404-
For Microsoft Entra ID or Azure AD B2C, you can use <xref:Microsoft.Identity.Web.AppBuilderExtension.AddMicrosoftIdentityWebApp%2A> from [Microsoft Identity Web](/entra/msal/dotnet/microsoft-identity-web/) ([`Microsoft.Identity.Web` NuGet package](https://www.nuget.org/packages/Microsoft.Identity.Web), [API documentation](<xref:Microsoft.Identity.Web?displayProperty=fullName>)), which adds both the OIDC and Cookie authentication handlers with the appropriate defaults. The sample app and the guidance in this article don't use Microsoft Identity Web. The guidance demonstrates how to configure the OIDC handler *manually* for any OIDC provider. For more information on implementing Microsoft Identity Web, see <xref:blazor/security/blazor-web-app-entra>.
406+
For Microsoft Entra ID, you can use <xref:Microsoft.Identity.Web.AppBuilderExtension.AddMicrosoftIdentityWebApp%2A> from [Microsoft Identity Web](/entra/msal/dotnet/microsoft-identity-web/) ([`Microsoft.Identity.Web` NuGet package](https://www.nuget.org/packages/Microsoft.Identity.Web), [API documentation](<xref:Microsoft.Identity.Web?displayProperty=fullName>)), which adds both the OIDC and Cookie authentication handlers with the appropriate defaults. The sample app and the guidance in this article don't use Microsoft Identity Web. The guidance demonstrates how to configure the OIDC handler *manually* for any OIDC provider. For more information on implementing Microsoft Identity Web, see <xref:blazor/security/blazor-web-app-entra>.
405407

406408
:::moniker-end
407409

@@ -749,7 +751,7 @@ oidcOptions.RemoteSignOutPath = new PathString("/signout-oidc");
749751

750752
(*Microsoft Azure only with the "common" endpoint*) <xref:Microsoft.IdentityModel.Tokens.TokenValidationParameters.IssuerValidator%2A?displayProperty=nameWithType>: Many OIDC providers work with the default issuer validator, but we need to account for the issuer parameterized with the Tenant ID (`{TENANT ID}`) returned by `https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration`. For more information, see [SecurityTokenInvalidIssuerException with OpenID Connect and the Azure AD "common" endpoint (`AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet` #1731)](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/1731).
751753

752-
Only for apps using Microsoft Entra ID or Azure AD B2C with the "common" endpoint:
754+
Only for apps using Microsoft Entra ID with the "common" endpoint:
753755

754756
```csharp
755757
var microsoftIssuerValidator = AadIssuerValidator.GetAadIssuerValidator(oidcOptions.Authority);
@@ -762,7 +764,7 @@ oidcOptions.TokenValidationParameters.IssuerValidator = microsoftIssuerValidator
762764

763765
:::moniker range=">= aspnetcore-9.0"
764766

765-
For Microsoft Entra ID or Azure AD B2C, you can use <xref:Microsoft.Identity.Web.AppBuilderExtension.AddMicrosoftIdentityWebApp%2A> from [Microsoft Identity Web](/entra/msal/dotnet/microsoft-identity-web/) ([`Microsoft.Identity.Web` NuGet package](https://www.nuget.org/packages/Microsoft.Identity.Web), [API documentation](<xref:Microsoft.Identity.Web?displayProperty=fullName>)), which adds both the OIDC and Cookie authentication handlers with the appropriate defaults. The sample app and the guidance in this article don't use Microsoft Identity Web. The guidance demonstrates how to configure the OIDC handler *manually* for any OIDC provider. For more information on implementing Microsoft Identity Web, see <xref:blazor/security/blazor-web-app-entra>.
767+
For Microsoft Entra ID, you can use <xref:Microsoft.Identity.Web.AppBuilderExtension.AddMicrosoftIdentityWebApp%2A> from [Microsoft Identity Web](/entra/msal/dotnet/microsoft-identity-web/) ([`Microsoft.Identity.Web` NuGet package](https://www.nuget.org/packages/Microsoft.Identity.Web), [API documentation](<xref:Microsoft.Identity.Web?displayProperty=fullName>)), which adds both the OIDC and Cookie authentication handlers with the appropriate defaults. The sample app and the guidance in this article don't use Microsoft Identity Web. The guidance demonstrates how to configure the OIDC handler *manually* for any OIDC provider. For more information on implementing Microsoft Identity Web, see <xref:blazor/security/blazor-web-app-entra>.
766768

767769
:::moniker-end
768770

@@ -1086,7 +1088,7 @@ oidcOptions.RemoteSignOutPath = new PathString("/signout-oidc");
10861088

10871089
(*Microsoft Azure only with the "common" endpoint*) <xref:Microsoft.IdentityModel.Tokens.TokenValidationParameters.IssuerValidator%2A?displayProperty=nameWithType>: Many OIDC providers work with the default issuer validator, but we need to account for the issuer parameterized with the Tenant ID (`{TENANT ID}`) returned by `https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration`. For more information, see [SecurityTokenInvalidIssuerException with OpenID Connect and the Azure AD "common" endpoint (`AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet` #1731)](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/1731).
10881090

1089-
Only for apps using Microsoft Entra ID or Azure AD B2C with the "common" endpoint:
1091+
Only for apps using Microsoft Entra ID with the "common" endpoint:
10901092

10911093
```csharp
10921094
var microsoftIssuerValidator = AadIssuerValidator.GetAadIssuerValidator(oidcOptions.Authority);
@@ -1491,7 +1493,7 @@ For more information, see the [Duende Access Token Management documentation for
14911493
<!-- UPDATE 10.0 The PU has scheduled dotnet/aspnetcore #55213
14921494
for investigation/resolution at .NET 10 -->
14931495

1494-
* [`AzureAD/microsoft-identity-web` GitHub repository](https://github.com/AzureAD/microsoft-identity-web/wiki): Helpful guidance on implementing Microsoft Identity Web for Microsoft Entra ID and Azure Active Directory B2C for ASP.NET Core apps, including links to sample apps and related Azure documentation. Currently, Blazor Web Apps aren't explicitly addressed by the Azure documentation, but the setup and configuration of a Blazor Web App for ME-ID and Azure hosting is the same as it is for any ASP.NET Core web app.
1496+
* [`AzureAD/microsoft-identity-web` GitHub repository](https://github.com/AzureAD/microsoft-identity-web/wiki): Helpful guidance on implementing Microsoft Identity Web for Microsoft Entra ID for ASP.NET Core apps, including links to sample apps and related Azure documentation. Currently, Blazor Web Apps aren't explicitly addressed by the Azure documentation, but the setup and configuration of a Blazor Web App for ME-ID and Azure hosting is the same as it is for any ASP.NET Core web app.
14951497
* [`AuthenticationStateProvider` service](xref:blazor/security/index#authenticationstateprovider-service)
14961498
* [Manage authentication state in Blazor Web Apps](xref:blazor/security/index#manage-authentication-state-in-blazor-web-apps)
14971499
* [Refresh token during http request in Blazor Interactive Server with OIDC (`dotnet/aspnetcore` #55213)](https://github.com/dotnet/aspnetcore/issues/55213)

aspnetcore/blazor/security/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ Permissible authentication values for the `{AUTHENTICATION}` placeholder are sho
176176
| `MultiOrg` | Organizational authentication for multiple tenants |
177177
| `Windows` | Windows Authentication |
178178

179+
[!INCLUDE[](~/includes/azure-active-directory-b2c-eol-support-notice.md)]
180+
179181
:::moniker-end
180182

181183
For more information, see the [`dotnet new`](/dotnet/core/tools/dotnet-new) command in the .NET Guide.
@@ -213,6 +215,8 @@ Permissible authentication values for the `{AUTHENTICATION}` placeholder are sho
213215
| `MultiOrg` | Organizational authentication for multiple tenants |
214216
| `Windows` | Windows Authentication |
215217

218+
[!INCLUDE[](~/includes/azure-active-directory-b2c-eol-support-notice.md)]
219+
216220
:::moniker-end
217221

218222
For more information:

aspnetcore/blazor/security/webassembly/graph-api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ To provide feedback or seek assistance with this article or ASP.NET Core, see <x
3535
> [!IMPORTANT]
3636
> The scenarios described in this article apply to using Microsoft Entra (ME-ID) as the identity provider, not AAD B2C. Using Microsoft Graph with a client-side Blazor WebAssembly app and the AAD B2C identity provider isn't supported at this time because the app would require a client secret, which can't be secured in the client-side Blazor app. For an AAD B2C standalone Blazor WebAssembly app use Graph API, create a backend server (web) API to access Graph API on behalf of users. The client-side app authenticates and authorizes users to [call the web API](xref:blazor/call-web-api) to securely access Microsoft Graph and return data to the client-side Blazor app from your server-based web API. The client secret is safely maintained in the server-based web API, not in the Blazor app on the client. **Never store a client secret in a client-side Blazor app.**
3737
38+
[!INCLUDE[](~/includes/azure-active-directory-b2c-eol-support-notice.md)]
39+
3840
:::moniker range="< aspnetcore-8.0"
3941

4042
Using a hosted Blazor WebAssembly app is supported, where the **:::no-loc text="Server":::** app uses the Graph SDK/API to provide Graph data to the **:::no-loc text="Client":::** app via web API. For more information, see the [Hosted Blazor WebAssembly solutions](#hosted-blazor-webassembly-solutions) section of this article.

aspnetcore/blazor/security/webassembly/hosted-with-azure-active-directory-b2c.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ uid: blazor/security/webassembly/hosted-with-azure-active-directory-b2c
1212

1313
[!INCLUDE[](~/blazor/security/includes/hosted-blazor-webassembly-notice.md)]
1414

15+
[!INCLUDE[](~/includes/azure-active-directory-b2c-eol-support-notice.md)]
16+
1517
This article explains how to create a [hosted Blazor WebAssembly solution](xref:blazor/hosting-models#blazor-webassembly) that uses [Azure Active Directory (AAD) B2C](/azure/active-directory-b2c/overview) for authentication.
1618

1719
For additional security scenario coverage after reading this article, see <xref:blazor/security/webassembly/additional-scenarios>.

aspnetcore/blazor/security/webassembly/hosted-with-microsoft-entra-id.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ uid: blazor/security/webassembly/hosted-with-microsoft-entra-id
1212

1313
[!INCLUDE[](~/blazor/security/includes/hosted-blazor-webassembly-notice.md)]
1414

15+
[!INCLUDE[](~/includes/azure-active-directory-b2c-eol-support-notice.md)]
16+
1517
This article explains how to create a [hosted Blazor WebAssembly solution](xref:blazor/hosting-models#blazor-webassembly) that uses [Microsoft Entra ID (ME-ID)](https://azure.microsoft.com/services/active-directory/) for authentication. This article focuses on a single tenant app with a single tenant Azure app registration.
1618

1719
This article doesn't cover a *multi-tenant ME-ID registration*. For more information, see [Making your application multi-tenant](/entra/identity-platform/howto-convert-app-to-be-multi-tenant).

aspnetcore/blazor/security/webassembly/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ Hosted Blazor WebAssembly apps:
351351

352352
:::moniker-end
353353

354+
[!INCLUDE[](~/includes/azure-active-directory-b2c-eol-support-notice.md)]
355+
354356
Further configuration guidance is found in the following articles:
355357

356358
* <xref:blazor/security/webassembly/additional-scenarios>

aspnetcore/blazor/security/webassembly/standalone-with-authentication-library.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This article explains how to secure an ASP.NET Core Blazor WebAssembly standalon
1616

1717
The Blazor WebAssembly Authentication library (`Authentication.js`) only supports the Proof Key for Code Exchange (PKCE) authorization code flow via the [Microsoft Authentication Library (MSAL, `msal.js`)](/entra/identity-platform/msal-overview). To implement other grant flows, access the MSAL guidance to implement MSAL directly, but we don't support or recommend the use of grant flows other than PKCE for Blazor apps.
1818

19-
*For Microsoft Entra (ME-ID) and Azure Active Directory B2C (AAD B2C) guidance, don't follow the guidance in this topic. See <xref:blazor/security/webassembly/standalone-with-microsoft-entra-id> or <xref:blazor/security/webassembly/standalone-with-azure-active-directory-b2c>.*
19+
*For Microsoft Entra (ME-ID) guidance, don't follow the guidance in this topic. See <xref:blazor/security/webassembly/standalone-with-microsoft-entra-id>.*
2020

2121
For additional security scenario coverage after reading this article, see <xref:blazor/security/webassembly/additional-scenarios>.
2222

aspnetcore/blazor/security/webassembly/standalone-with-azure-active-directory-b2c.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ uid: blazor/security/webassembly/standalone-with-azure-active-directory-b2c
1212

1313
[!INCLUDE[](~/includes/not-latest-version.md)]
1414

15+
[!INCLUDE[](~/includes/azure-active-directory-b2c-eol-support-notice.md)]
16+
1517
This article explains how to create a [standalone Blazor WebAssembly app](xref:blazor/hosting-models#blazor-webassembly) that uses [Azure Active Directory (AAD) B2C](/azure/active-directory-b2c/overview) for authentication.
1618

1719
For additional security scenario coverage after reading this article, see <xref:blazor/security/webassembly/additional-scenarios>.

0 commit comments

Comments
 (0)