cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
joew72
Level: Powered On

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
Community Support Team
Community Support Team

Re: Security Profile Based on Specific Field Information

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
Community Support Team
Community Support Team

Re: Security Profile Based on Specific Field Information

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,844)