共用方式為


Microsoft.Identity.Client.Desktop Namespace

NuGet NuGet downloads GitHub Repo stars

The Microsoft.Identity.Client.Desktop namespace and included functionality is available through the Microsoft.Identity.Client.Desktop package. This package contains binaries needed to use the Windows authentication broker and other features with MSAL.NET on older platforms such as .NET Framework and .NET Core 3.

This package requires the use of Microsoft.Identity.Client.

Warning

This package and namespace are intended for legacy applications that want to use the Web Account Manager (WAM) in Windows.

For modern applications, refer to Microsoft.Identity.Client.Broker.

Installation

Using the .NET Command-Line Interface (CLI):

dotnet add package Microsoft.Identity.Client.Desktop

Using the NuGet Command Line Interface (CLI):

nuget install Microsoft.Identity.Client.Desktop

Using the Package Manager Console:

Install-Package Microsoft.Identity.Client.Desktop

Using Visual Studio:

  1. Open the Solution Explorer.
  2. Right-click on a project within the solution.
  3. Click on Manage NuGet Packages...
  4. Click on the Browse tab and search for Microsoft.Identity.Client.Desktop.
  5. Click on the Microsoft.Identity.Client.Desktop package and click Install.

Documentation

To get started, check out the Microsoft Authentication Library for .NET guide. To learn more about the use of Web Account Manager with MSAL.NET, refer to Using MSAL.NET with Web Account Manager (WAM).

Samples

Refer to Microsoft identity platform code samples and the Samples Browser.

Classes

DesktopExtensions

MSAL extensions for desktop apps

WamExtension

WAM related extensions.

Remarks

Contributions

We appreciate feedback and contributions to help make Microsoft Authentication Library for .NET better! Before you get started, please read the following documents:

Issues

To provide library feedback or report a bug, please open an issue on GitHub.