cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
avizhome
New Member

Getting 0365 group memebers

Hi All,

I am trying to get a boolean value of a selected textbox by comparing it with a security group from o355. However not all the users from the o365 security group is been populated.

Lower(SearchUser_1.Selected.Email) in Lower(Concat(Office365Groups.ListGroupMembers("167cb604-XXX-44c1-XXX-e484dd766XXX").value,mail &", "))

Any suggestion?

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @avizhome ,

Could you please share a bit more about your issue?

Do you mean that the Office365Groups.ListGroupMembers() function could not list all users from your Security Group?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:

17.JPG

On your side, please modify your formula as below:

Lower(SearchUser_1.Selected.Email) in Lower(
       Concat(
             Office365Groups.ListGroupMembers("167cb604-XXX-44c1-XXX-e484dd766XXX", {'$top': 999}).value,                             // specify 999 for the '$top' attribute
             mail & ";"
       )
)

 

If the issue still exists, please consider take a try to use AzureAD.GetGroupMembers() function to achieve your needs. Please try the following formula:

Lower(SearchUser_1.Selected.Email) in Lower(
          Concat(
                 AzureAD.GetGroupMembers("167cb604-XXX-44c1-XXX-e484dd766XXX").value, 
                 mail & ";"
          )
       )

 

Please take a try with above solution, then check if the issue is solved.

 

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
v-xida-msft
Community Support
Community Support

Hi @avizhome ,

Could you please share a bit more about your issue?

Do you mean that the Office365Groups.ListGroupMembers() function could not list all users from your Security Group?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:

17.JPG

On your side, please modify your formula as below:

Lower(SearchUser_1.Selected.Email) in Lower(
       Concat(
             Office365Groups.ListGroupMembers("167cb604-XXX-44c1-XXX-e484dd766XXX", {'$top': 999}).value,                             // specify 999 for the '$top' attribute
             mail & ";"
       )
)

 

If the issue still exists, please consider take a try to use AzureAD.GetGroupMembers() function to achieve your needs. Please try the following formula:

Lower(SearchUser_1.Selected.Email) in Lower(
          Concat(
                 AzureAD.GetGroupMembers("167cb604-XXX-44c1-XXX-e484dd766XXX").value, 
                 mail & ";"
          )
       )

 

Please take a try with above solution, then check if the issue is solved.

 

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

Thanks @v-xida-msft ,

 

You are an absolute lifesaver 🙂

 

I am pretty new to power apps and have been struggling with this for a while.

I have got a toggle button that gets enable if the selected user is part of a security group. It was sort of working with my code but was not showing all users from that particular group.

 

 Capture.JPG

 

 

 

 

 

 

 

With your code, I can see all the members now.

Lower(SearchUser_1.Selected.Email) in Lower(
Concat(
Office365Groups.ListGroupMembers("167cb604-XXX-44c1-XXX-e484dd766XXX", {'$top': 999}).value, // specify 999 for the '$top' attribute
mail & ";"
)
)

 

So what does that $top:999 do? is it only searching the top 999 users from the security group?

I also tried with the AzureAD.Groupmemebers() as you suggested but that too is not populated all the users from the security group.

 

Thanks for your help!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

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