How I can use Azure Active Directory Authentication in .NET 8 Blazor web app template with auto Render Mode and which packages I need to intsall ?

Kuldeep Y 36 Reputation points

I am using latest Blazor web app template for application development and I want to Use Azure active directory login in my app but get stuck, Actually I am confused how and where I need to configure Azure Ad Details either in Client or Server project and which packages I need to Use and where to use. any help would be appreciated

Microsoft Technologies based on the .NET software framework.
3,190 questions
A set of technologies in the .NET Framework for building web applications and XML web services.
4,023 questions
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,324 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
18,742 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce ( 52,826 Reputation points

    there is no proper documentation at this point. see these threads:

    the latest template supports individual accounts. this is has the sample client authentication provider initialized by the server code. you should change the server code to use azure ad authentication.

    0 comments No comments

  2. Navya 2,795 Reputation points Microsoft Vendor

    Hi @Kuldeep Y

    Thank you for posting this in Microsoft Q&A.

    I understand you want to know how to use Azure Active Directory Authentication in .NET 8 Blazor web app template with auto Render Mode and which packages need to install.

    Blazor uses the existing ASP.NET Core authentication mechanisms to establish the user's identity. The exact mechanism depends on how the Blazor app is hosted, server-side or client-side.

    Auto render mode means it Interactive server-side rendering using Blazor Server initially and then client-side rendering on subsequent visits after the Blazor bundle is downloaded.

    Please go through the below document: ASP.NET Core Blazor authentication and authorization ASP.NET Core Blazor render modes

    Hope this helps. Do let us know if you any further queries.



    0 comments No comments