Skip to content

Commit 9907c0f

Browse files
authored
Merge pull request #180590 from mmacy/patch-10
[msid][issue] Clarify that Core 5 does not use suffix '2' (GH-73384)
2 parents 70c5882 + dc8b49f commit 9907c0f

File tree

1 file changed

+27
-21
lines changed

1 file changed

+27
-21
lines changed

articles/active-directory/develop/microsoft-identity-web.md

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.service: active-directory
1010
ms.subservice: develop
1111
ms.topic: conceptual
1212
ms.workload: identity
13-
ms.date: 10/09/2020
13+
ms.date: 11/19/2021
1414
ms.author: jmprieur
1515
ms.reviewer: marsma
1616
ms.custom: "devx-track-csharp, aaddev"
@@ -21,6 +21,8 @@ ms.custom: "devx-track-csharp, aaddev"
2121

2222
Microsoft Identity Web is a set of ASP.NET Core libraries that simplifies adding authentication and authorization support to web apps and web APIs integrating with the Microsoft identity platform. It provides a single-surface API convenience layer that ties together ASP.NET Core, its authentication middleware, and the [Microsoft Authentication Library (MSAL) for .NET](https://github.com/azuread/microsoft-authentication-library-for-dotnet).
2323

24+
You can get Microsoft.Identity.Web from NuGet or by using a Visual Studio project template to create a new app project.
25+
2426
## Supported application scenarios
2527

2628
If you're building ASP.NET Core web apps or web APIs and want to use Azure Active Directory (Azure AD) or Azure AD B2C for identity and access management (IAM), we recommend using Microsoft Identity Web for all of these scenarios:
@@ -30,11 +32,7 @@ If you're building ASP.NET Core web apps or web APIs and want to use Azure Activ
3032
- [Protected web API that only authenticated users can access](scenario-protected-web-api-overview.md)
3133
- [Protected web API that calls another (downstream) web API on behalf of the signed-in user](scenario-web-api-call-api-overview.md)
3234

33-
## Get the library
34-
35-
You can get Microsoft Identity Web from [NuGet](#nuget), [.NET Core project templates](#project-templates), and [GitHub](#github).
36-
37-
#### NuGet
35+
## Install from NuGet
3836

3937
Microsoft Identity Web is available on NuGet as a set of packages that provide modular functionality based on your app's needs. Use the .NET CLI's `dotnet add` command or Visual Studio's **NuGet Package Manager** to install the packages appropriate for your project:
4038

@@ -43,37 +41,45 @@ Microsoft Identity Web is available on NuGet as a set of packages that provide m
4341
- [Microsoft.Identity.Web.MicrosoftGraph](https://www.nuget.org/packages/Microsoft.Identity.Web.MicrosoftGraph) - Optional. Provides simplified interaction with the Microsoft Graph API.
4442
- [Microsoft.Identity.Web.MicrosoftGraphBeta](https://www.nuget.org/packages/Microsoft.Identity.Web.MicrosoftGraphBeta) - Optional. Provides simplified interaction with the Microsoft Graph API [beta endpoint](/graph/api/overview?view=graph-rest-beta&preserve-view=true).
4543

46-
#### Project templates
44+
## Install by using a Visual Studio project template
45+
46+
Several project templates that use Microsoft Identity Web are included in .NET SDK versions 5.0 and above. The project templates aren't included in the ASP.NET Core 3.1 SDK, but you can install them separately.
4747

48-
Microsoft Identity Web project templates are included in .NET 5.0 and are available for download for ASP.NET Core 3.1 projects.
48+
### .NET 5.0+ - Project templates included
4949

50-
If you're using ASP.NET Core 3.1, install the templates with the .NET CLI:
50+
The Microsoft Identity Web project templates are included in .NET SDK versions 5.0 and above.
51+
52+
This example .NET CLI command creates a Blazor Server project that includes Microsoft Identity Web.
5153

5254
```dotnetcli
53-
dotnet new --install Microsoft.Identity.Web.ProjectTemplates::1.0.0
55+
dotnet new blazorserver --auth SingleOrg --calls-graph --client-id "00000000-0000-0000-0000-000000000000" --tenant-id "11111111-1111-1111-1111-111111111111" --output my-blazor-app
5456
```
5557

56-
The following diagram shows a high-level view of the supported app types and their relevant arguments:
58+
Don't append a `2` to the application type argument (`blazorserver` in the example) if you're using the templates included in .NET SDK 5.0+. Include the `2` suffix *only* if you're on ASP.NET Core 3.1 and you installed the templates separately as described in the next section.
5759

58-
:::image type="content" source="media/microsoft-identity-web-overview/diagram-microsoft-identity-web-templates.png" lightbox="media/microsoft-identity-web-overview/diagram-microsoft-identity-web-templates.png" alt-text="Diagram of the available dot net CLI project templates for Microsoft Identity Web":::
59-
<br /><sup><b>*</b></sup> `MultiOrg` is not supported with `webapi2`, but can be enabled in *appsettings.json* by setting tenant to `common` or `organizations`
60-
<br /><sup><b>**</b></sup> `--calls-graph` is not supported for Azure AD B2C
60+
### ASP.NET Core 3.1 - Install the project templates
6161

62-
This example .NET CLI command, taken from our [Blazor Server tutorial](tutorial-blazor-server.md), generates a new Blazor Server project that includes the right packages and starter code (placeholder values shown):
62+
If you're using ASP.NET Core 3.1, install the project templates from NuGet.
6363

6464
```dotnetcli
65-
dotnet new blazorserver2 --auth SingleOrg --calls-graph --client-id "00000000-0000-0000-0000-000000000000" --tenant-id "11111111-1111-1111-1111-111111111111" --output my-blazor-app
65+
dotnet new --install Microsoft.Identity.Web.ProjectTemplates
6666
```
6767

68-
#### GitHub
68+
For ASP.NET Core 3.1 *only*, append a `2` to the application type argument when you create a new project:
69+
70+
```dotnetcli
71+
dotnet new blazorserver2 --auth SingleOrg --calls-graph --client-id "00000000-0000-0000-0000-000000000000" --tenant-id "11111111-1111-1111-1111-111111111111" --output my-blazor-app
72+
```
6973

70-
Microsoft Identity Web is an open-source project hosted on GitHub: <a href="https://github.com/AzureAD/microsoft-identity-web" target="_blank">AzureAD/microsoft-identity-web</a>
74+
The following diagram shows several of the available app type templates and their arguments. Append a `2` to the app type argument (`blazorserver2` in the example) only if you're using the ASP.NET Core 3.1 SDK and you installed the templates by using `dotnet new --install`.
7175

72-
The [repository wiki](https://github.com/AzureAD/microsoft-identity-web/wiki) contains additional documentation, and if you need help or discover a bug, you can [file an issue](https://github.com/AzureAD/microsoft-identity-web/issues).
76+
:::image type="content" source="media/microsoft-identity-web-overview/diagram-microsoft-identity-web-templates.png" lightbox="media/microsoft-identity-web-overview/diagram-microsoft-identity-web-templates.png" alt-text="Diagram of the available dot net CLI project templates for Microsoft Identity Web":::
77+
<br /><sup><b>*</b></sup> `MultiOrg` is not supported with `webapi2`, but can be enabled in *appsettings.json* by setting tenant to `common` or `organizations`
78+
<br /><sup><b>**</b></sup> `--calls-graph` is not supported for Azure AD B2C
7379

74-
## Features
80+
## Features of the project templates
7581

76-
Microsoft Identity Web includes several features not provided if you use the default ASP.NET 3.1 project templates.
82+
Microsoft Identity Web includes several features not available in the default ASP.NET Core 3.1 project templates.
7783

7884
| Feature | ASP.NET Core 3.1 | Microsoft Identity Web |
7985
|------------------------------------------------------------------------------------------|----------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|

0 commit comments

Comments
 (0)