Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Referencing group members from a SharePoint User Column

(2) ShareShare
ReportReport
Posted on by 23
Afternoon all! Man I love this forum! I'm back to ask only the second question I wasn't able to find an answer by searching already solved materials.
 
I have a SharePoint list with a User/Group column that is used for in-app permissions and field settings as shown below.
 
 
When a specific user is in the list, I am easily able to set a variable for that users permissions. However, when I have a group in the list, the code doesn't work as I'd hope. For instance users in the XYZ_Email_Recipients group don't get the Email permissions provided through the checkmark.
 
The PA code for setting these variables is shown below.
Set(
    varSupervisor,
    LookUp(
        varSettings,
        User.Email = User().Email
    ).SupervisorGroup
);
Set(
    varEmailRecipients,
    LookUp(
        varSettings,
        User.Email = User().Email
    ).XYZ_Email_Recipients || User().Email in Office365Groups.ListGroupMembers("d18b7a5e-xxxx-yyyy-zzzz-25d5f71cd599").value.mail

);
The top Set() function works great for users, but I had to include the O365.ListGroupMembers function in order to read a users' permissions for the XYZ_Email_Recipients group. If this list contained one or two groups, this wouldn't be too bad to hard-code the guid. However, I have 20+ groups that need to be referenced from this list.
 
What's the best way to reference permissions when a group is listed in the SharePoint column?
 
EDIT-1: Since none of my responses are showing up, due to a mod approval I guess, I'll address questions here. No, I don't necessarily want the "group" to have the permissions. What I want is to be able to reference people belonging to the group from within the SharePoint list. The groups will change often so having to keep track of groupid's, or hard-coding a solution, isn't feasible.
Categories:
  • AB_CHRT Profile Picture
    23 on at
    Referencing group members from a SharePoint User Column
    @FLMike
    I want to assign permissions to the user. The "group" doesn't need permissions, but everyone in the group does if that group has an associated checkmark somewhere in the list.
  • Michael E. Gernaey Profile Picture
    41,007 Super User 2025 Season 1 on at
    Referencing group members from a SharePoint User Column
    Hi
     
    Question: If the "user" is really a group, do you want to assign permission to the group or do you really want to assign individuals permissions?
     
     

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.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard