Azure AD - App Registration Privacy statement URL

TEJENDRA PRASAD PATEL 111 Reputation points
2023-06-30T13:54:48.1233333+00:00

Hi All,

I'm curious about the "Privacy statement URL" in Azure Active Directory - App Registration under Branding & Properties.

I have a Microsoft asp.net core mvc 6 web application.Identity.Web authentication has been deployed.

I'd like to show the Policy Acceptance Page before the Home Page.

Is it feasible to display the policy page using the "Privacy statement URL" or do I need to construct my own controller and view?

Also, I only intended to show it before the user logged in if possible.

Thank you very much!

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,187 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,269 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,561 questions
0 comments No comments
{count} votes

Accepted answer
  1. Shweta Mathur 27,711 Reputation points Microsoft Employee
    2023-07-03T11:27:52.49+00:00

    Hi @TEJENDRA PRASAD PATEL ,

    Thanks for reaching out.

    The "Privacy statement URL" in Azure Active Directory - App Registration under Branding & Properties is the terms of service and privacy statement which are surfaced to users through the user consent experience when user signed in.

    User's image

    To display a policy acceptance page before the home page of your web application, you will need to construct your own controller and view. You can create a new controller and view that displays the policy acceptance page and then redirect the user to the home page after they accept the policy.

    [Authorize]
    public class PolicyController : Controller
    {
        public IActionResult Accept()
        {
            // Display the policy acceptance page
            return View();
        }
    }
    
    
    

    In this example, the [Authorize] attribute is added to the PolicyController class to ensure that only authenticated users can access the Accept action. If an unauthenticated user tries to access the Accept action, they will be redirected to the login page.

    Hope this will help.

    Thanks,

    Shweta


    Please remember to "Accept Answer" if answer helped you.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful