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 41 Reputation points
2024-01-08T08:32:18.4766667+00:00

Hii,
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

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

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 61,731 Reputation points
    2024-01-08T20:59:02.9433333+00:00

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

    https://github.com/dotnet/aspnetcore/issues/48772

    https://github.com/dotnet/AspNetCore.Docs/issues/29452

    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 6,845 Reputation points Microsoft Vendor
    2024-02-08T12:55:53.8466667+00:00

    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

    https://github.com/AdrienTorris/awesome-blazor ASP.NET Core Blazor render modes

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

    Thanks,

    Navya.

    0 comments No comments