Microsoft Identity Platform not available as authentication type choice for a Blazor Server app

297 Views Asked by At

I am looking into adding Azure AD (Entra) to a Blazor application, as the title says, I can only select these authentication type options:

enter image description here

While in comparison, a youtube video shows this:

enter image description here

Further on it shows the kind of options I would need for my Entra integration.

How can I add Microsoft Identity Platform as an option?

1

There are 1 best solutions below

3
On

For Blazor Server App, there is no .NET8.0 version available.

Even I have checked in the latest VS 17.9.0 Preview Version.

enter image description here

Microsoft Identity Platform for .NET 8.0 is currently not supported for Blazor WebApp Template.

  • But you can find and option to configure it from the Connected Services.

enter image description here

  • This option will create an App Registration and the necessary configuration is done in the registered App.

enter image description here

  • The below NuGet Packages are installed in the app. Check your .csproj file.
  <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0" />
  <PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.0" />
  <PackageReference Include="Microsoft.Identity.Web" Version="2.16.0" />
  <PackageReference Include="Microsoft.Identity.Web.UI" Version="2.16.0" 
  • You need to add the code and configuration manually.

Refer Microsoft Identity Authentication - Blazor Web App and Authentication to Blazor Web Apps to get the configuration and try to configure same in .NET8.0 with latest NuGet Packages.