I have implemented the Azure Active Directory authentication following Azure AD Authentication
on the Stackoverflow. In my project, I need the authentication only on the Settings page and the other pages to be available without any authentication. Can anyone guide me on how to achieve this?
I have a dedicated layout page for the Settings page which calls the <partial name="_LoginPartial" />
You can configure which pages to protect from unauthorised users as follows:
services.AddRazorPages()
.AddRazorPagesOptions(options =>
{
options.Conventions.AuthorizePage("/Settings");
});