cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
joew72
Advocate I
Advocate I

Security Profile Based on Specific Field Information

Hi PowerApps community

 

I'm relatively new to PowerApps and just setting up the security for a model-driven app we are setting up to manage some case files we have as an organisation.

 

I have setup an entity called 'Case' which has sensitive data on certain fields so I want to setup security on these particular records (or if possible specific fields). I have done this through field security profiles HOWEVER I would like to know if it is possible to set up the system so that only certain records can be accessed by a particular team based on the type of record it is.

 

For example, we have Project 1 and Project 2. All case records are stored in the 'Case' entity. There is a field within 'Case' called 'Project' and the user either selects Project 1 or Project 2. I want to set it up so that teams can only access certain records, i.e. Team 1 can only access Project 1 records and Team 2 can only access Project 2 records (all the while keeping all the data stored in the 'Case' entity).

 

If it is possible to set it up so that Team 1 can access some Project 2 records but be limited to what fields they can access, that would be ideal but not vital.

 

Thoughts?

1 ACCEPTED SOLUTION

Accepted Solutions
v-monli-msft
Community Support
Community Support

Hi @joew72 ,

 

I assume that the "Case" entity is a CDS entity and it is the data source that you want to use. Then you can achieve this by embedding a canvas app to your model-driven form. Follow the steps in below documentation to achieve this:

https://powerapps.microsoft.com/en-us/blog/enrich-your-model-driven-forms-with-embedded-canvas-apps-...

 

Then in the canvas app designer, you could add Case entity and Office 365 Users as the data source, then you can check if the current user is in one of the group and Filter the data accordingly.

 

For example, assume that Project is  Two Options data type filed. Then you can show different data for the same gallery for different group like:

If(CountRows(Filter(Office365Groups.ListGroupMembers(“your group guid here1“).value, mail = User().Email)) = 1,Filter(Case, Project= 'Project(Case)'.Project1),CountRows(Filter(Office365Groups.ListGroupMembers(“your group guid here2“).value, mail = User().Email)) = 1,Filter(Case, Project= 'Project(Case)'.Project2))

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-monli-msft
Community Support
Community Support

Hi @joew72 ,

 

I assume that the "Case" entity is a CDS entity and it is the data source that you want to use. Then you can achieve this by embedding a canvas app to your model-driven form. Follow the steps in below documentation to achieve this:

https://powerapps.microsoft.com/en-us/blog/enrich-your-model-driven-forms-with-embedded-canvas-apps-...

 

Then in the canvas app designer, you could add Case entity and Office 365 Users as the data source, then you can check if the current user is in one of the group and Filter the data accordingly.

 

For example, assume that Project is  Two Options data type filed. Then you can show different data for the same gallery for different group like:

If(CountRows(Filter(Office365Groups.ListGroupMembers(“your group guid here1“).value, mail = User().Email)) = 1,Filter(Case, Project= 'Project(Case)'.Project1),CountRows(Filter(Office365Groups.ListGroupMembers(“your group guid here2“).value, mail = User().Email)) = 1,Filter(Case, Project= 'Project(Case)'.Project2))

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,642)