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
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).
23
23
24
+
You can get Microsoft.Identity.Web from NuGet or by using a Visual Studio project template to create a new app project.
25
+
24
26
## Supported application scenarios
25
27
26
28
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
30
32
-[Protected web API that only authenticated users can access](scenario-protected-web-api-overview.md)
31
33
-[Protected web API that calls another (downstream) web API on behalf of the signed-in user](scenario-web-api-call-api-overview.md)
32
34
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
38
36
39
37
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:
40
38
@@ -43,37 +41,45 @@ Microsoft Identity Web is available on NuGet as a set of packages that provide m
43
41
-[Microsoft.Identity.Web.MicrosoftGraph](https://www.nuget.org/packages/Microsoft.Identity.Web.MicrosoftGraph) - Optional. Provides simplified interaction with the Microsoft Graph API.
44
42
-[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).
45
43
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.
47
47
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
49
49
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.
51
53
52
54
```dotnetcli
53
-
dotnet new --install Microsoft.Identity.Web.ProjectTemplates::1.0.0
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.
57
59
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
61
61
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.
Microsoft Identity Web is an open-source project hosted on GitHub: <ahref="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`.
71
75
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
73
79
74
-
## Features
80
+
## Features of the project templates
75
81
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.
77
83
78
84
| Feature | ASP.NET Core 3.1 | Microsoft Identity Web |
0 commit comments