Autentisering: API:er för AzureAD.UI och AzureADB2C.UI och paket markerade som föråldrade
I ASP.NET Core 2.1 tillhandahålls integrering med Azure Active Directory (Azure AD) och Azure Active Directory B2C-autentisering (Azure AD B2C) av Microsoft.AspNetCore.Authentication.AzureAD.UI och Microsoft.AspNetCore.Authentication.AzureADB2C.UI-paketen . Funktionerna som tillhandahålls av dessa paket baseras på Azure AD v1.0-slutpunkten.
I ASP.NET Core 5.0 och senare tillhandahålls integrering med Azure AD- och Azure AD B2C-autentisering av Microsoft.Identity.Web-paketet . Det här paketet baseras på Microsoft Identity Platform, som tidigare kallades Azure AD v2.0-slutpunkten. Därför var de gamla API:erna i paketen Microsoft.AspNetCore.Authentication.AzureAD.UI
och Microsoft.AspNetCore.Authentication.AzureADB2C.UI
inaktuella.
Mer information finns i GitHub-problem med dotnet/aspnetcore#25807.
Version introducerad
5.0 Förhandsversion 8
Gammalt beteende
API:erna har inte markerats som föråldrade.
Nytt beteende
API:erna är markerade som föråldrade.
Orsak till ändringen
Azure AD- och Azure AD B2C-autentiseringsfunktionen migrerades till API:er för Microsoft Authentication Library (MSAL) som tillhandahålls av Microsoft.Identity.Web
.
Rekommenderad åtgärd
Följ API-vägledningen Microsoft.Identity.Web
för webbappar och webb-API:er.
Berörda API:er
- Microsoft.AspNetCore.Authentication.AzureADAuthenticationBuilderExtensions
- Microsoft.AspNetCore.Authentication.AzureAD.UI.AzureADDefaults
- Microsoft.AspNetCore.Authentication.AzureAD.UI.AzureADOptions
- Microsoft.AspNetCore.Authentication.AzureADB2CAuthenticationBuilderExtensions
- Microsoft.AspNetCore.Authentication.AzureADB2C.UI.AzureADB2CDefaults
- Microsoft.AspNetCore.Authentication.AzureADB2C.UI.AzureADB2COptions