Notifications
Announcements
Hello All,
I have a requirement to hide and show the Save button in powerapps screen based on the current user permissions which are stored in CDS Security roles. I am able to get the all groups (Security Roles) to Powerapps screen but could not able to get Permission levels of user and Particular group where current user exists. Can anyone help how to achieve this.
Thanks in advance if anyone could help !!!
Is this a canvas app or a model-driven app ? If it's a model-driven app, you can define a DisplayRule with an EntityPrivilegeRule and associate it with a ribbon button; this will only display the button if the user has the appropriate privilege(s).
If it's a canvas app you can use the systemuserroles_association entity (strictly it's an N:N relationship) to get the roles associated with users, and filter this by the current user id. Alternatively, you could create a dummy entity in CDS, and apply permissions such that only the users in roles who should be able to see the Save button would be able to view a record in this dummy entity, and test to see if the user can get any results
Hi David,
This is Canvas app and I have below formulae on items.
Here if apply 'Security Roles' then I can see all list and when i have added 'systemuserroles_association' then its not taking.
Thanks,
Bhushan
That query will only give you security role details (i.e. the role name and similar items), it won't give you the modular level of access I think you want and getting to that level would be beyond painful.
My advice would be to create a security role(s) for this functionality and give the users who need this functionality the appropriate security role(s)
@bhushan235
Please take a look at the accepted solution of the thread below. It should help you out!
https://powerusers.microsoft.com/t5/Building-Power-Apps/Get-user-security-role/td-p/448866
Julien
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 796 Most Valuable Professional
Michael E. Gernaey 327 Super User 2025 Season 2
Power Platform 1919 268