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

Community site session details

Session Id : CwROnNgEJXnxesyzZCgmJ9
Power Apps - Building Power Apps
Answered

Get list of distribution lists that user is a member of

Like (0) ShareShare
ReportReport
Posted on 1 Mar 2024 17:22:58 by

My end goal is to provide my users with a drop down that will have all the distribution lists they are a member of.

 

Using the Office365Groups.ListGroups I am able to get a list of all the groups and distribution lists in my company. 

Using the Office365Groups.ListGroupMembers I am able to see the users that are members of those groups.

I thought I could just create a dropdown and use Office365Groups.ListOwnedGroupsV3,

however when I use Office365Groups.ListOwnedGroupsV3 it appears to only return office 365 groups and not any distribution lists. 

 

So I can currently create a list of the distribution groups and see the users but I am getting stuck on how I create a dynamic dropdown for the current user that will show the distribution lists they belong too. Is there a different command to use to return the distribution lists or is there a way to compile the list from a combination of the first two commands. 

 

Any help would be greatly appreciated. 

I have the same question (0)
  • Verified answer
    mhawkins Profile Picture
    on 01 Mar 2024 at 19:42:05
    Re: Get list of distribution lists that user is a member of

    Well I think I have figured it out. Used ForAll to iterate through the groups and check for the user and if the user was a member it added the group to a collection. 

     

    I put this in the OnVisible of the screen.

    ClearCollect(ListTest,Office365Groups.ListGroups().value);
    Clear(TestDrop);
    ForAll(Filter(ListTest,"Regulatory" in mail),If(User().Email in (Office365Groups.ListGroupMembers(ThisRecord.id).value).mail, Collect(TestDrop,mail),""))

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 629 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 397 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 232 Moderator

Last 30 days Overall leaderboard
Loading complete