Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hide and show Views based on Security roles

I have a scenario, where I need to hide couple of Views of an entity to a security roles. There is no direct way to do this in power apps ui. How to hide specific views for specific roles is my requirement.

Advocate I
Advocate I

Hi @Anonymous ,


It is likely that PowerApps can identify your user for you - simply because you can't use a PowerApp unless the user authenticates first (unless you're using Portals, and even then there is some level of identity, whether it's explicit or impersonated).  You can generally use the email address of the user as a unique identifier of that user - easy to see by just adding a label to your screen and setting the Text: property to 


Knowing who the user is, is the first part of role-based view control.  The second part is deciding what they can see/not see based on who they are.

Here, there's a few possible scenarios depending on what you mean by "views" and what exactly you're trying to achieve from a user and security/administration perspective.  For example, to affect a users experience based on their identity/username;  

1: Security can sometimes be applied at the datasource that hides data that the current user is not allowed to see

2: Some datasources (like SQL) can create 'views' of data and only allow certain users to access them as a datasource

3: A filter can be applied on a datasource query that only fetches data you want the user to see

4: Similar to 3. above, PowerApps can apply logic a certain way based on who the user is, affecting what they can see/do (eg: certain screens or UI controls accessible or not based on who the user is)

When it comes to group membership, roles or RBAC, PowerApps itself is not an authentication/authorization provider, so you don't assign people roles in PowerApps.  You do it in your authentication provider (like Azure AD).  You can however create your own pseudo-roles for your app and assign them - just by storing usernames and roles somewhere and applying 3 & 4 above, or you can use PowerApps to check Team/Group memberships in AD or Teams and use that to apply filters/logic.

Each scenario is quite a lot to explain, if you can perhaps be a little more specific about what it is you're trying to achieve (from the user experience perspective, and the security perspective, screenshots would help), and then we can look at the best way to achieve that?


Helpful resources

October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022


Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (3,407)