Introduction: In this blog, we will understand how we can assign security to webpages in PowerApps Portal.
By assigning security to web pages you can hide or show your web pages based on the user’s web roles in PowerApps Portal.
Use Case: In my example, I have a webpage named “Project” that webpage should only be visible to users who have the manager web role in PowerApps Portal, and for all other users that page should be hidden.
Steps to be followed:
- Go to the “Portal Management” model-driven app and create a web role.
- Enter details and click on save.
- For example, I am creating Manager Role.
- Name: Give a name to your web role.
- Website: select your website.
- After creating a web role, go to Portal Management Studio.
- Go to make.powerapps.com
- Select your portal–>click on more commands(…)–>click on Edit.
- Select your webpage.
- Go to Permissions section
- Set “Page available to everyone” to false.
- Click on “+Select Roles”
- Add the web roles for whom this page will be visible
- After Adding web role click on “Sync configuration“
- If you will go to PowerApps Portal you will notice the “Project” webpage is now not visible in navigation.
Sign in to the portal with a user who has Manager Role
- A user named XYZ has a “Manager” web role.
- After signing into portal user can see Project Webpage.
Sign in to the portal with a user who doesn’t have Manager Role
- Below user has only “Authenticated Users” web role.
- User will get Access Denied message.
I hope you find this helpful!!