After checking all of your posts, I realized that I can use ActiveDirectory object to search for "User". However; after setup up my default Active Directory; as requested; I still can't get any results? what am I missing exactly?
ActiveDirectory.searchRecursively("User", username);
Hi,
Please provide a bit more details:
Thanks a lot for your time,
vRO is in version 7.20 and AD plug-in is in version 3.0.3
CN=myuser,OU=XXXX,OU=XXXX,DC=XXXX,DC=com
Yes, I'm
NULL ARRAY
No errors in vso.log; unfortunately I don't have access nor admin rights to backend to be able see "server.log"
OK, I'm not sure if the searching for users using the format "CN=myuser,..." is supported by the plug-in. Will check in the plug-in's source code.
Could you check if searching works if you use the format "myuser" ?
ActiveDirectory.searchRecursively("User", username);
will do startsWith "username" on following "User" class attributes "sAMAccountName", "userPrincipalName", "displayname", "givenName", "sn", "cn"
For example I have following user :
"sAMAccountName":"ivo",
"userPrincipalName":"ivo@gia.net",
"displayname": "Ivo",
"givenName":"Ivo",
"sn":"ivo",
"cn":"ivo"
It returns the user with following call.
> ActiveDirectory.searchRecursively("User", "ivo");
Note that search is performed only in default host (or host provided as intput parameter searchRecursively method ) and is also limited to entries inside configured "Base"
Sorry for the confusion, I actually search for the user name as "myuser" not as "CN=myuser, OU=XXX, ......"
Could you please further elaborate on "limited to entries inside configured "Base" ".
Thanks..
When you register an AD server using the workflow 'Add an Active Directory server', one of the required input parameters is Base (usually, it is LDAP DN looking like DC=XXXX,DC=com).
Does the last parts of DN of your user (CN=myuser,OU=XXX,DC=XXXX,DC=com) match the configured Base DN?
When I tried the code under a different user, it works perfectly. However, it doesn't work under my user.