Follow my blog for more interesting topics on Dynamics 365, Portals and Power Platform. For training and consulting, write to us at info@xrmforyou.com
PowerApps Portals offers various methods of Authentication. And irrespective of the authentication mechanism being used in the portal, the default behavior is the user is always taken to the profile page post sign in.
However my requirement was to redirect the user to a Dashboard page post sign in. For example – I have an account entity list dashboard which needs to be Default Landing page for authenticated users.
For anonymous users, the default landing page should continue to be the home page.
To do this, the first thing we need to do is make use of Web Templates and modify it. For this requirement we will modify the Home Page web template.
Open your Home Web Template and include the following code
{% if user %} //if any user logs in <script> window.location.href='./dashboard/'; </script> {% else %} //Home web page code, if you don't want to display the page when the user is being redirected. Your existing Home web template code {% endif %}
Save your Web template and refresh your portal cache. Once refreshed, browse your portal URL. Below is the user experience post sign in of portal.
Hope this helps
Debajit Dutta
(Microsoft MVP)
Discover more from Debajit's Power Apps & Dynamics 365 Blog
Subscribe to get the latest posts sent to your email.