Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 17903

Active Directory Users Query is Slow

$
0
0

The query below takes 30-60 seconds for 10k users, consuming a lot of processor and network bandwith while it runs.  Is there a faster way to write this query?  I suspect that I am downloading the entire set of tables in #"records" but I am not sure how to select the user table directly.

 

let
    Source = ActiveDirectory.Domains("domain.com"),
    #"records" = Source{[Domain="sub.domain.com"]}[#"Object Categories"],
    #"select user table" = #"records"{[Category="user"]}[Objects],
    #"get principal name" = Table.ExpandRecordColumn(
        #"select user table", 
        "top", {"msDS-PrincipalName"}, 
        {"Principal Name"}),
    #"filter principal name" = Table.SelectColumns(
        #"get principal name",
        {"Principal Name"})
in
    #"filter principal name"

 

 

Thanks in advance..


Viewing all articles
Browse latest Browse all 17903

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>