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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
hgorina
Frequent Visitor

active directory SAM (pre-windows 2000 username)

Hello,

 

I need to retrieve pre-windows 2000 username from Active directory, so I can cross reference it to the data I have from other source.

 

I know  that it's proper name is SAMAccountName or pre-Windows 2000, cannot find it in AD. I can get all other user info, but not that..

 

How do I query AD (on premice, not Azure) for pre-windows 2000 username?

 

Many thanks for your help!

1 ACCEPTED SOLUTION
hgorina
Frequent Visitor

Figured it out:

see below  

substitute BlaBla for your domain name

 

 

let
Source = ActiveDirectory.Domains("BlaBla"),
#"BlaBla" = Source{[Domain="BlaBla"]}[Object Categories],
user = #"BlaBla"{[Category="user"]}[Objects],
#"Expanded top" = Table.ExpandRecordColumn(user, "top", {"msDS-PrincipalName"}, {"top.msDS-PrincipalName"})
in
#"Expanded top"

View solution in original post

2 REPLIES 2
hgorina
Frequent Visitor

Figured it out:

see below  

substitute BlaBla for your domain name

 

 

let
Source = ActiveDirectory.Domains("BlaBla"),
#"BlaBla" = Source{[Domain="BlaBla"]}[Object Categories],
user = #"BlaBla"{[Category="user"]}[Objects],
#"Expanded top" = Table.ExpandRecordColumn(user, "top", {"msDS-PrincipalName"}, {"top.msDS-PrincipalName"})
in
#"Expanded top"

Hi @hgorina,

 

Thanks for your sharing the solution which will benefit other communities. As the issue is solved, would you please mark your reply as an answer so that we can close the thread.

 

Best Regards,
Qiuyun Yu

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors