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

Filter group membership based on Department

I have a requirement for my app as follows:

 

There is an Office365 group containing a list of people with approval authority from across the organization.

I need to create an approvers list field in my app that only displays people from that group whose department matches that of the current user.

 

Is there any way this can be achieved? The Office365Group.ListGroupMembers function does not appear to return the department, so can't just run a simple filter on the results.

1 ACCEPTED SOLUTION

Accepted Solutions

@rdorman ,

That is why I suggested they need their own Group. Very messy (and I have not tried it), but you would need to get the Group membership and then their Departments with Office365Users and filter on that.

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @rdorman ,

This blog of mine may be useful - you simply need to put the approvers in a Group of their own.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Hi @WarrenBelz ,

 

Thanks for your response. Unfortunately this does not answer my question.

 

I do already have a group of approvers. But it contains approvers from all branches of the organisation.

 

My PowerApp needs to be able to filter that group to only the approvers from the branch that matches that of the current user. 

 

Ideally we don't want to have to create a group for each branch as that is 18+ groups to then have to maintain the membership for.

@rdorman ,

That is why I suggested they need their own Group. Very messy (and I have not tried it), but you would need to get the Group membership and then their Departments with Office365Users and filter on that.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (1,774)