Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
Suggested answer

An anonymous user clicks on an authenticated-only page, how to redirect to correct sign-in page

(0) ShareShare
ReportReport
Posted on by 21
Hi community,
 
I'd like to ask for everyone's help. 
 
Background is, we have our Power Pages site tied to an Azure Front Door for us to append and overwrite HTTP headers for the website. While we're testing, we noticed that when an anonymous user clicks on an authenticated user-only page, it redirects to the login page of the x.powerappsportals.com rather than the login page of our Azure Front Door URL. How do we change this out of the box redirection? Help us out, please. 
 
Thank you in advance, guys and gals. 
Categories:
  • apangeles_ Profile Picture
    21 on at
    An anonymous user clicks on an authenticated-only page, how to redirect to correct sign-in page
    Hi @Inogic

    I hope you could still help us out with this. Thank you very much. 
     
    Regards,
  • apangeles_ Profile Picture
    21 on at
    An anonymous user clicks on an authenticated-only page, how to redirect to correct sign-in page
    Hi @Inogic, 
     
    I know this is very basic for most of you guys. But where should I apply this liquid code? I mean, where should I paste and edit it? Thank you so much!
     
  • Suggested answer
    Inogic Profile Picture
    1,038 Super User 2025 Season 1 on at
    An anonymous user clicks on an authenticated-only page, how to redirect to correct sign-in page
    Hi,
     
    If you want to redirect user to other site then below solution is one of the way to do so,

    when the user click on the Authenticated Page link put an onclick event and check the user role using liquid and if the user role is anonymous user then redirect the user to the "login page of your Azure Front Door URL". Put the following code in your onclick event;



    Note: Make sure that the role name should exactly match with the one present in Portal Management App.

    Hope this helps.
     
    Thanks!
    Inogic

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 69 Super User 2025 Season 1

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 49 Most Valuable Professional

#3
Jon Unzueta Profile Picture

Jon Unzueta 43