Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JuhaU
Regular Visitor

Only part of groups returned from active directory

Hi

 

I am trying to pull all active directory groups to Power BI, but I get only small part of them. I have no problem geting them with powershell so I think this is not an autentication issue. I idea what is going on here.

 

Br Juha

6 REPLIES 6
lbendlin
Super User
Super User

show your M code?

Hi

Here it is 

 

let
Source = ActiveDirectory.Domains("nt.ad.xxx"),
ad.xxx = Source{[Domain="ad.xxx"]}[#"Object Categories"],
group1 = ad.xxx{[Category="group"]}[Objects],
#"Expanded securityPrincipal" = Table.ExpandRecordColumn(group1, "securityPrincipal", {"sAMAccountName"}, {"securityPrincipal.sAMAccountName"}),
#"Expanded group" = Table.ExpandRecordColumn(#"Expanded securityPrincipal", "group", {"location", "member", "owner"}, {"group.location", "group.member", "group.owner"}),
#"Expanded group.member" = Table.ExpandListColumn(#"Expanded group", "group.member"),
#"Expanded group.member1" = Table.ExpandRecordColumn(#"Expanded group.member", "group.member", {"displayName", "sAMAccountName"}, {"group.member.displayName", "group.member.sAMAccountName"}),
#"Removed Columns" = Table.RemoveColumns(#"Expanded group.member1",{"top", "msExchMailStorage", "posixGroup", "msExchIMRecipient", "msExchBaseClass", "msExchCustomAttributes"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"securityPrincipal.sAMAccountName", "GroupSAMLName"}, {"group.member.sAMAccountName", "GroupMemberSAMLName"}})
in
#"Renamed Columns"

Do you get a timeout message? How long does the same process take in Powershell?  How many of these groups are large (say, over 1000 members) ?

There is no errors.  Most of the groups are small. I think 99% of them are have under 10 members. In powershell it takes about 30s

Can you try this version?

 

let
    Source = ActiveDirectory.Domains("xx.net"),
    xx.net = Source{[Domain="xx.net"]}[#"Object Categories"],
    group1 = xx.net{[Category="group"]}[Objects],
    #"Removed Other Columns" = Table.SelectColumns(group1,{"displayName", "group", "securityPrincipal", "distinguishedName"}),
    #"Expanded securityPrincipal" = Table.ExpandRecordColumn(#"Removed Other Columns", "securityPrincipal", {"sAMAccountName"}, {"securityPrincipal.sAMAccountName"}),
    #"Expanded group" = Table.ExpandRecordColumn(#"Expanded securityPrincipal", "group", {"location", "member", "owner"}, {"group.location", "group.member", "group.owner"}),
    #"Expanded group.member" = Table.ExpandListColumn(#"Expanded group", "group.member"),
    #"Expanded group.member1" = Table.ExpandRecordColumn(#"Expanded group.member", "group.member", {"displayName", "sAMAccountName"}, {"group.member.displayName", "group.member.sAMAccountName"})
in
    #"Expanded group.member1"

Hi

 

It didn't help

 

BR Juha

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors