VMware Cloud Community
Uriende
Contributor
Contributor
Jump to solution

Problem with the active directory plugin

I have an issue with the active directory plugin that it doesn't show the OUs under a spesific OU (I'm guessing that it is because there are too many objects in that spesific OU and for some reason it limits the amount of objects it can show).

For a workaround I wanted to use the ActiveDirectory scripting class and use the search method but I just can't figure out a way to actually create that object to use the mehod I guess I just don't understand somthing in the API.

0 Kudos
1 Solution

Accepted Solutions
Andreas_Diemer
Enthusiast
Enthusiast
Jump to solution

Reading this it looks like that there could be a typo ...

Please share your script or look for a typo like ActiveDirectory.Search().


For example - the System object will throw: TypeError: Cannot find default value for object

for this line code


System.Iog("Test");


because this is not a lower case L it is an upper case i, and this method does'nt exist on System object....

Other objects are throwing correct errors like, this method doesn't exist in dyn wrapper ....

This depends on implementation and error handling inside this I suppose

regards,

Andreas

------ for correct and / or useful answers please award points visit http://www.vcoteam.info & http://mighty-virtualization.blogspot.com

View solution in original post

0 Kudos
6 Replies
igaydajiev
VMware Employee
VMware Employee
Jump to solution

As far as I remember it was  singleton so you can directly use it - ActiveDirectory.search().

0 Kudos
Uriende
Contributor
Contributor
Jump to solution

I've tried doing that, but that just gives me an error: "Type Error: Cannot find default value for object"

0 Kudos
Andreas_Diemer
Enthusiast
Enthusiast
Jump to solution

Reading this it looks like that there could be a typo ...

Please share your script or look for a typo like ActiveDirectory.Search().


For example - the System object will throw: TypeError: Cannot find default value for object

for this line code


System.Iog("Test");


because this is not a lower case L it is an upper case i, and this method does'nt exist on System object....

Other objects are throwing correct errors like, this method doesn't exist in dyn wrapper ....

This depends on implementation and error handling inside this I suppose

regards,

Andreas

------ for correct and / or useful answers please award points visit http://www.vcoteam.info & http://mighty-virtualization.blogspot.com
0 Kudos
igaydajiev
VMware Employee
VMware Employee
Jump to solution

Following script  :

------------------

// search for user "administrator"

var user = ActiveDirectory.search("User","administrator");

System.log(user);

------------------------

produces following output :

[2014-02-04 14:10:45.368] [I] DynamicWrapper (Instance) : [AD_User]-[class ch.dunes.ad.object.User] -- VALUE : User:CN=Administrator,CN=Users,DC=gia,DC=net

in my environement

Uriende
Contributor
Contributor
Jump to solution

It was indeed a typo. I feel quite silly that I did not notice

0 Kudos
tschoergez
Leadership
Leadership
Jump to solution

Nooo worries, that happens. Glad that together we got it working, and thanks for marking Andreas' answer properly Smiley Happy

Joerg

0 Kudos