cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Filter Office365Groups by department

Hi,

 

Due to the delegation limitations, I am unable to use Office365.SearchUser() function fully. However, alternatively I have Office365 Groups where we have separate groups maintained for each JobTitle by which i can avoid delegation. Planned to use that. However, I noticed I am unable to filter by department.

 

Is there anyway once I have returned all Office365Groups members, can i filter by specific department ??

 

Office365Groups.ListGroupMembers("XXXXXXXXXXXXXXXXXXXXXXX").value.displayName

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Filter Office365Groups by department

Hi @Kumar9024021 ,

Do you want to filter your member results returned from the Office365Groups.ListGroupMembers(...) function based on a specific department?

 

If you want to filter your member results returned from the Office365Groups.ListGroupMembers(...) function based on a specific department, I afraid that there is no direct way to achieve your needs.

The result the Office365Groups.ListGroupMembers(...) function returned does not contain "department" property. As an alternative solution, I think the combination of Office 365 Users connector and Office 365 Groups connector could achieve your needs.

 

I have made a test on my side, please consider take a try with the following formula:

Filter(
       AddColumns(
                   Office365Groups.ListGroupMembers("xxxxxxxxxxxxxxxxxx").value, 
                   "department", 
                   Office365Users.UserProfile(id).Department
       ),
       department = "Specific Department"
)

 

More details about the AddColumns function, please check the following article:

AddColumns function

 

Best regards,

Community Support Team _ Kris Dai
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

2 REPLIES 2
Highlighted
Microsoft
Microsoft

Re: Filter Office365Groups by department

@Kumar9024021 

 

I think office 365 groups List group members action will not give the department details.

It will only fetch information about user name, display name. jobtitle, mail and office location.

 

you can setup a filter with this information.

You can check the below documentation for more information regarding filter query in power apps.

The query you have posted below it will fetch only display name, you can change display name with any other desired filed and can setup formula accordingly.

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

 

If this information helps you, please hit the like button and mark the solution as resolved, so that it will help other users in future.

Highlighted
Community Support
Community Support

Re: Filter Office365Groups by department

Hi @Kumar9024021 ,

Do you want to filter your member results returned from the Office365Groups.ListGroupMembers(...) function based on a specific department?

 

If you want to filter your member results returned from the Office365Groups.ListGroupMembers(...) function based on a specific department, I afraid that there is no direct way to achieve your needs.

The result the Office365Groups.ListGroupMembers(...) function returned does not contain "department" property. As an alternative solution, I think the combination of Office 365 Users connector and Office 365 Groups connector could achieve your needs.

 

I have made a test on my side, please consider take a try with the following formula:

Filter(
       AddColumns(
                   Office365Groups.ListGroupMembers("xxxxxxxxxxxxxxxxxx").value, 
                   "department", 
                   Office365Users.UserProfile(id).Department
       ),
       department = "Specific Department"
)

 

More details about the AddColumns function, please check the following article:

AddColumns function

 

Best regards,

Community Support Team _ Kris Dai
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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,081)