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 / Page permissions ONLY ...
Power Pages
Unanswered

Page permissions ONLY for anonymous user roles

(0) ShareShare
ReportReport
Posted on by 252

Hi everyone, 

 

If someone from the community found the need to assign pages only to Anonymous user roles, please help.

 

Situation: 

Whenever a user logs in to a page, the assigned page only to anonymous users would then disappear on the authenticated user's header. Is there any way to do this? 

 

The roles available currently are authenticated and administration roles. Any ideas?

 

Thank you

Categories:
I have the same question (0)
  • Shirsagr Profile Picture
    8 on at

    you can use liquid template code in Header web template and render the link.

    The web template already contains logic to render "sign in" link (that appears only to Anonymous users).

  • apangeles Profile Picture
    252 on at

    I could simply use an if-then-else for this?

  • Saud Ali Profile Picture
    812 Super User 2024 Season 1 on at

    Hi @apangeles ,

     

    This feature is not available OOB, you have to use liquid code in Header Template where header is rendering. I have done the same is my last project. Here is an example how you can do it.

     

    {% for link in primary_nav.weblinks %}
    
     {% if link.name == "My Public Page" or link.name == "Another Page" %}
     {% if user %}
     {% continue %}
     {% endif %}
     {% endif %}
    
     {% unless forloop.first %}

     

     

    saudali_25_0-1688369765542.png

     

    Thanks,

    Saud

     

    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.

     

  • Fubar Profile Picture
    8,491 Super User 2026 Season 1 on at

    Create a "Restrict Read" Web Page Access Control Rule for the Web Page in question -  then assign that Rule to the "Anonymous Users" Web Role. (believe you can do it from both interfaces, if not can definitely be done from the Portal Management app)

    https://learn.microsoft.com/en-us/power-pages/security/page-security

     

    (Restrict Read restricts users from seeing a Web Page unless the users  Web Role is associated with the Rule)

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Valantis Profile Picture

Valantis 59

#2
11manish Profile Picture

11manish 51

#3
Haque Profile Picture

Haque 28

Last 30 days Overall leaderboard