web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / STOP Anonymous Access ...
Power Pages
Unanswered

STOP Anonymous Access -  Restrict All Pages to Unauthenticated Users

(0) ShareShare
ReportReport
Posted on by

I want to be able to stop anonymous access users from accessing any of the pages apart from the register/login page. 

Once they have registered or logged in then they can see the other pages. How can I achieve this? 

Categories:
I have the same question (0)
  • oliver.rodrigues Profile Picture
    9,368 Most Valuable Professional on at

    Hi

     

    You need to define Web Page Access Control Rules for every page (besides home I believe)

     

    optionally.... 

    You can also add a JavaScript code in the to validate if the user is logged in, redirecting them to the sign-in page in case they aren't

    this JS could be placed in the Home Page or even the "Tracking Code" Content Snippet, which would trigger in every page

     

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Michel-vdb Profile Picture
    15 on at

    Hello,

     

    To restrict the entire portal to be accessible only by authenticated users, add an Access Control Rule to the Homepage (root page).

     

    1. In the Portal Administration app (model-driven app), go to Web Pages and find the homepage, should be the page with Partial URL set to just /
      MichelvndnBrink_0-1603374259008.png

       

    2. Switch to the Access Control Rules tab and add a new Web Page Access Control Rule
      MichelvndnBrink_1-1603374311181.png

       

    3.  Enter a name for this rule (you can enter any name you want) and set the Right to Restrict Read
      Also set the Scope to Exclude direct child web files (this will ensure your CSS still loads)
      MichelvndnBrink_2-1603374443264.png

       

    4. Switch to the Web Roles tab and add the Authenticated Users role. This means that only users with that role will be able to access the homepage. This automatically excludes all anonymous users. (All authenticated users always have the Authenticated Users role)

      MichelvndnBrink_3-1603374605363.png

       

    5. When you add a Web Page Access Control Rule to the homepage, this will be inherited by all other pages, because all other pages are considered below the homepage and thus inherit this rule.

      That's it. Your portal is now secured. Every time any anonymous user tries to access your portal, they will be force redirected to the sign in page.

     

    Hope this answers your question and helps you out!

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard