cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
asmedic85
Frequent Visitor

Set the Person or Group field to mutiple SharePoint Groups

Hello,

 

I have SharePoint list that I customized in Power App. I have run in to a slight permissions issue. 

 

Product: A list where employees can submit a leave request or the request can be submitted on behalf of the employee.

 

Permission Goal: I do not want all employees to be able to see all SharePoint list items. Only the following people should be able to see what is on the SharePoint list.

  1. The Employee
  2. The Requestor
  3. All members of 3 specific SharePoint groups.

 

Plan: I will filter out all items unless the user is listed in one of the 3 following fields:

  1.      Column Type: Person or Group, allow single selection, editable, Column Name: Employee Name 
  2.      Column Type: Person or Group, allow single selection,  editable, Column Name: Requestor Name 
  3.      Column Type: Person or Group, allow multiple selections, not-editable and hidden, Column Name: Controllers

 

Considerations:

  1.  I have considered setting the SharePoint list advanced setting to read, create and edit items only created by user but that causes an issue since I need supervisors or be able to submit the request on behalf of the employee also. 
  2. I have considered using a Microsoft Flow that starts when a new item is created. It would stop sharing an item or file as shown by Vikram_Samal's post filting/restricting list items on the basis of user group in sharepoint online classic - Microsoft T... Not sure if that would accomplish the goal.

 

Question and Problem: Trying to set the value in the Controllers column to multiple SharePoint groups.  As stated the Controllers column is hidden on the SharePoint list and in the Power App but I want the value to be automatically set to 3 SharePoint Permissions groups (group names would be Leave Request Managers, Leave Request Admins, Leave Request Auditors) The SharePoint Groups use Web Enabled Security Group Emails.

 

How can I accomplish this?

 

 

 

5 REPLIES 5
BCLS776
Super User
Super User

Unfortunately, Sharepoint lists must be shared with anyone using your app, and there isn't column-level access restrictions. You can make it a bit difficult for people to see, but you won't keep them out of the data completely. If security is a big concern here, you should choose a different back end.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Thanks for the reply. Understanding I can't completely restrict things, is there a way to set the value of a person or group field to those three SharePoint groups either in Power App or using flow?

There are two primary ways to manage some roles with Sharepoint lists:

  1. Make another list with all your users and flags/descriptors of their roles. In the app, use their role to control functionality and filters.
  2. Use 365 Groups and the Office365Groups and Office365Users connectors to handle the same logic

I like method #2 because if a person is savvy enough to find the list used in method #1 then they are also capable of modifying the contents to their liking. Method #2 requires a level of admin access to alter the 365 Groups.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
asmedic85
Frequent Visitor

Ok let me ask a different question. 

 

How do set the value of a person or group field to a specific SharePoint group in Power App instead of a specific user?

I am unsure if you can do that. I know you can set a People and Groups column to a 365 Group or individual users, but those are different entities than a Sharepoint Group.

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,861)