Hi dfriel,
I wrote a quick JScript script that queries my AD domain for some of the attributes you listed, and it ran fine as a standard domain user. Here's a copy of the script I wrote:
var defaultNC, connection, command, rs;
defaultNC = GetObject("LDAP://rootDSE").Get("defaultNamingContext");
connection = new ActiveXObject("ADODB.Connection");
connection.Provider = "ADsDSOObject";
connection.Open();
command = new ActiveXObject("ADODB.Command");
command.ActiveConnection = connection;
command.Properties.Item("Cache results") = false;
command.Properties.Item("Page size") = 1000;
command.CommandText = "<LDAP://" + defaultNC + ">;" +
"(&(objectCategory=person)(objectClass=user));" +
"sAMAccountName,distinguishedName,displayName,givenName," +
"sn,telephoneNumber,userAccountControl" +
";subtree";
rs = command.Execute();
while (! rs.EOF) {
WScript.Echo('"' + rs.Fields.Item("sAMAccountName") + '",' +
'"' + rs.Fields.Item("distinguishedName") + '",' +
'"' + rs.Fields.Item("displayName") + '",' +
'"' + rs.Fields.Item("givenName") + '",' +
'"' + rs.Fields.Item("sn") + '",' +
'"' + rs.Fields.Item("telephoneNumber") + '",' +
'"' + rs.Fields.Item("userAccountControl") + '"');
rs.MoveNext();
}
I'm note sure what some of your code is doing, but the sample code above does a serverless bind to rootDSE to determine the default naming context, and then it queries AD using ADO using the specified attributes.
HTH,
Bill