Notifications
Announcements
No record found.
Hello,
Does anyone know how to redirect a portal contact to a different page after logging in? Currently in my portal after logging in the user is sent to the home page, but I would like to send them to one of two other pages based on their webrole. I'm guessing this could be done through liquid, but I am not sure how. Or is there a better way to acheive this outside of liquid? Thanks for any help!
We highly recommend users to migrate to PowerUsers community for new Portal questions:
powerusers.microsoft.com/.../PowerAppsPortals
you can add a liquid code in your Home web page, make sure to add in the content/localized web page and not the root web page
I would also recommend using sitemarkers to have a "shortcut" to your web page
your code should look something like:
{% if user.roles contains 'Administrator' %} {% assign redirectURL = sitemarkers["My admin page"].url %} {% else %} {% assign redirectURL = sitemarkers[" My other page"].url %} {% endif %}
------------
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.
Hi Oliver,
Thank you for your reply, but I am still looking for a different result. I adjusted your code to my webroles and sitemarkers and added this to my local Home web page and cleared the cache. Then when I navigate to the site, I am taken to the Sign In page instead of the home page. Once signed in the redirect is set to the second sitemarker in the else statement regardless of webrole. I think this is because the liquid is being evaluated off the anonymous user when first accessing the site. Is there a way for this to evaluate only at sign in? Otherwise the homepage is inaccessible as it always redirects to the sign in page/ Second sitemarker (I have access control rules for each sitemarker used) and I still need anonymous users to see information on the home page. Thank you again for your help!
Also Thank You for pointing out the PowerUsers community, I will go there for future questions!
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 83 Super User 2025 Season 2
Gerardo RenterÃa Ga... 49 Most Valuable Professional
#ManoVerse 40