Showing results for 
Search instead for 
Did you mean: 
Helper V
Helper V

Active Directory - Get Members of Dynamic Group

Using the Active Directory (AD) connector in Power Query (latest ver), I'm able to view all groups, but i'm not able to 'Expand' to Group.Member on AD groups that are Dynamic, or those groups that use LDAP queries to populate them.


Is this a feature/limitation of AD or a bug perhaps?


Here's the code that should return all users in a group.   


    Source = ActiveDirectory.Domains(""), = Source{[Domain=""]}[#"Object Categories"],
    group1 ={[Category="group"]}[Objects],
    #"Expanded securityPrincipal" = Table.ExpandRecordColumn(group1, "securityPrincipal", {"sAMAccountName"}, {"securityPrincipal.sAMAccountName"}),
    #"Filtered Rows" = Table.SelectRows(#"Expanded securityPrincipal", each [securityPrincipal.sAMAccountName] = "ALL-EmplsAndContractors"),
    #"Expanded group" = Table.ExpandRecordColumn(#"Filtered Rows", "group", {"member"}, {"group.member"}),
    #"Expanded group.member" = Table.ExpandListColumn(#"Expanded group", "group.member")
    #"Expanded group.member"
Resolver II
Resolver II

I found a post here with some code that I am trying to adapt


It's a blog post.

If I get anywhere I will update this post.

New Member

Anyone get an answer on this?  I would really like to get the number of users per group.  I can see the count when I click on the List field for the record but would love to bring this value forward to report on it.

New Member



did you resolve this issue or not ?


thank you,


best regards,



Helpful resources

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors