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

Announcements

News and Announcements icon
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,453 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
DP_Prabh Profile Picture

DP_Prabh 53

#1
rezarizvii Profile Picture

rezarizvii 53

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 24 Most Valuable Professional

Last 30 days Overall leaderboard