Redirect to Custom Web Page after user Login PowerApps Portal
Redirect a portal user to the custom build webpages instead of the default Profile/Home page after log in.
As we implemented the portal for an organization dealing in policies. Now based on their business scenario If the End user completed the Intake Process, then we need to redirect to the one-page else redirect to another webpage.
To accomplish the Intake Process, we must make two changes in the system as per the below: –
Open the Portal Management app from the environment apps à Search for the site settings from the area.
Navigate to the Site Settings à Search for the “Authentication/Registration/ProfileRedirectEnabled”.
Update the default value from true to false à save the record.
Clear the Portal Cache. Now Poral user will stop redirecting to the Profile page instead of this it will redirect to the Home web- page. Now we must write some additional liquid code on the Home webpage to redirect the logged-in user on custom webpage as described below.
Navigate to à Home Web Template and include following highlighted code:-
So in the above code we have written some fetch XML to retrieve the data and based on the retrieve data size we are redirecting the logged in user to different webpages.
Save the record à Clear the poral cache.
Conclusion: So, in this way we can dynamically redirect the Portal User to the custom build webpages based on the conditions using the liquid code.