Share via

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

Developer technologies | .NET | Blazor
Microsoft Security | Microsoft Entra | Microsoft Entra ID
Developer technologies | .NET | Other
Developer technologies | ASP.NET Core | Other

2 answers

Sort by: Most helpful
  1. Gudivada Adi Navya Sri 21,095 Reputation points Moderator
    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.

    Was this answer helpful?

    0 comments No comments

  2. Bruce (SqlWork.com) 84,061 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.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.