Forum Discussion
Import Global Address List?
- Anonymous4 years ago
In this M code, replace "CompanyDomain.com" with whatever your domain is, in quotes, except for the Step Name CompanyDomain.com, which is without quotes, and the user step, which CompanyDomain.com is entered without quotes.
let
Source = ActiveDirectory.Domains("CompanyDomain.com"),
CompanyDomain.com = Source{[Domain = "CompanyDomain.com"]}[Object Categories],
user = CompanyDomain.com{[Category = "user"]}[Objects],
#"Removed Other Columns" = Table.SelectColumns(user, {"displayName", "user", "organizationalPerson"}),
#"Expanded organizationalPerson" = Table.ExpandRecordColumn(#"Removed Other Columns", "organizationalPerson", {"department"}, {"department"}),
#"Expanded user 1" = Table.ExpandRecordColumn(#"Expanded organizationalPerson", "user", {"mail"}, {"mail"})
in
#"Expanded user 1"--Nate
I don't think you'll find a table in the active directory that is specifically address book. However if you go to the person records you will find everybody's name and email address as a record. Select those columns and records, expand them, and you've got all of your organazation's names and email addresses. Done.
--Nate