JamesMW
Enthusiast
Enthusiast

Active Directory 2.0 Plugin - searchExactMatch error

Jump to solution

There appears to be a bug in the ActiveDirectory 2.0 plugin, or I'm doing something wrong.

When I try to pass a specific host in the function ActiveDirectory.serachExactMatch, it doesn't seem to use it. For example:

var user = ActiveDirectory.searchExactMatch("User","myusername",1,ad_host);

If I do not have a default AD provider configured, this call fails to find a user. If I have a default provider config'ed, it can then find my user in that default domain, but fails to use the domain I passed.

Doing other calls defining the host seem to work like:

var computer = ActiveDirectory.getComputerAD("mycomputername",ad_host);

This works fine, returns my expected computer object in the correct domain, only the serachExactMatch seems to have a problem.

While i could constantly switch my default domain to whatever domain I'm currently working against, that's a hack and I'd rather see it fixed (if it indeed is an issue)

Can others repo this issue?

-James

0 Kudos
1 Solution

Accepted Solutions
igaydajiev
VMware Employee
VMware Employee

There is newer  tech preview version of the plugin available (Active Directory 2.0.3). Could you try if it resolves the issue with User.memberOf ()?

Technical preview version of VMware vCenter Orchestrator Plug-In for Microsoft Active DirectoryTechnical preview version of VMware vCenter Orchestrator Plug-In for Microsoft Active Directory?

View solution in original post

0 Kudos
10 Replies
JamesMW
Enthusiast
Enthusiast

Little more testing indicates this is an issue:

System.log(ad_host)

var computer = ActiveDirectory.getComputerAD("mycomputer",ad_host);

System.log(computer)

var users = ActiveDirectory.searchExactMatch("User","myuser",ad_host);

System.log(users)

Outputs:

[2015-06-09 12:04:31.743] [I] DynamicWrapper (Instance) : [AD_Host]-[class com.vmware.o11n.plugin.ad.model.AdHost] -- VALUE : #_v2_#,#RootItem#,#d4e29aa9-e0c4-4d82-9289-7f39b090cccb#

[2015-06-09 12:04:32.182] [I] DynamicWrapper (Instance) : [AD_Computer]-[class ch.dunes.ad.object.Computer] -- VALUE : #_v2_#,#Computer#,#d4e29aa9-e0c4-4d82-9289-7f39b090cccb#,#<mycomputer DN>#

[2015-06-09 12:04:32.182] [I] Default Active Directory server not set. (Workflow:deledteme / Scriptable task (item1)#4)

0 Kudos
Burke-
VMware Employee
VMware Employee

Have you updated to the Tech Preview build of the AD Plugin?? It's available on the "Documents" tab of this community and may address the issue you are facing.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos
JamesMW
Enthusiast
Enthusiast

Same issue, it is reverting the the default provider, not the one I am passing.

0 Kudos
igaydajiev
VMware Employee
VMware Employee

According the Scripting API documentation for ActiveDirectory.searchExactMatch () function ad_host parameter should be the fourth parameter not the third one (see attached screenshot). The third parameter actually is search limit.

Any[] searchExactMatch(string type, string objectName,number limit , AD_Host adServer)

The correct line should be


var users = ActiveDirectory.searchExactMatch("User","myuser",100, ad_host); 

JamesMW
Enthusiast
Enthusiast

Agh! Thank you, that did resolve the first issue, but it brings me back to the original problem I was having (not stated here yet).

Hopefully I'm not mis-reading anything again, but here is the behavior I'm seeing...

1.) If you do not have a default provider set, the memberOf property of a AD_User returns undefined.

2.) If you have a default provider set to, lets say, Domain1, and you search for a user in Domain1, the memberOf property is populated as expected.

3.) If you have a default provider set to say Domain1, and search for a user in Domain2, the memberOf property is populated with an array of null objects. The length of the array looks to be correct, but the objects are all null.

Thanks,

James

0 Kudos
igaydajiev
VMware Employee
VMware Employee

Which version of the plugin do you use (including minor 2.0.?)?

Have you tried with 2.0.2-2670588 available here Technical preview version of VMware vCenter Orchestrator Plug-In for Microsoft Active Directory?

.....

Version 2.0.2-2670588

  • Fixed AD:UserGroup.userMembers return null when user name contain comma.
  • Fixed AD:UserGroup.userMembers return null when the users are not part of default domain.
0 Kudos
JamesMW
Enthusiast
Enthusiast

I'm using: Active Directory 2.0.2.2670588. As recommended by Burke.

0 Kudos
igaydajiev
VMware Employee
VMware Employee

This looks like a  bug. I will try to reproduce it in my environment. Consider also opening a bug to vmware support.

0 Kudos
igaydajiev
VMware Employee
VMware Employee

There is newer  tech preview version of the plugin available (Active Directory 2.0.3). Could you try if it resolves the issue with User.memberOf ()?

Technical preview version of VMware vCenter Orchestrator Plug-In for Microsoft Active DirectoryTechnical preview version of VMware vCenter Orchestrator Plug-In for Microsoft Active Directory?

View solution in original post

0 Kudos
JamesMW
Enthusiast
Enthusiast

That did it, thanks.

0 Kudos