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

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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,273)