web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using Office365Groups....
Power Apps
Answered

Using Office365Groups.ListGroupMembers with nested groups

(0) ShareShare
ReportReport
Posted on by 302

I'm inspecting group membership to control view/edit access to parts of my App using the Office365Groups connector.

 

I'm using the following instruction to check if a user is a Telecom Manager:

Set(gTelecomManager,!IsEmpty(Filter(Office365Groups.ListGroupMembers(gTelecomManagersGroup).value,mail=User().Email)));

 

This works fine if the group contains individual users, but when I add another security group to the TelecomManagers Group instead of using individual members, the  instruction returns false, even if the user is part of (one of) the member group(s) of the Telecom Managers group. I could go recursively through the group(s) and check deeper and deeper until I get to the individual user level, but this will quickly get wieldy and probably slow. What would be the recommended way to make this work ?

 

Stephane

 

Categories:
  • bouillons Profile Picture
    302 on at

    I tried the other way around, by using the ListOwnedGroupsV3 to see if the group I need to be part of to edit/view something in the App returns any rows.

     

    Filter(Office365Groups.ListOwnedGroupsV3().value,StartsWith(displayName,"SG_TelecomManagers"))

     

    Unfortunately this method only returns Office365 groups, and not AD security groups. Even if I base my security on Office365 groups instead of AD Security groups, I'm still stuck as I will have to add individuals instead of groups as members of the TelecomManagers group.

     

    Stephane

  • Verified answer
    bouillons Profile Picture
    302 on at

    Hi, based on Solved: Office365Groups Connector to security group - Power Platform Community (microsoft.com), I used another connector. the AzureAD connector has more capabilities and it takes nested group membership into account.

     

    Set(gTelecomManagersGroup,"12db ... ID of the Group ... 8ca6");
    Set(gTelecomManager,!IsEmpty(Filter(AzureAD.GetMemberGroupsV2(User().Email, true).value, Value=gTelecomManagersGroup)));

     Stephane

  • alrezac Profile Picture
    Microsoft Employee on at

    Hi,

     

    Thanks for your post! I am glad that you were able to get this issue resolved. Hopefully this will prove useful for future communities users.

     

    Regards,

     

    Alex

     

    -------

     

    Community Support Team _ Alex Rezac
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard