Forum Discussion
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!
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"
2 Replies
- hgorinaFrequent 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"- v-qiuyu-msftCommunity Support
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