Commens
Enthusiast
Enthusiast

'TypeError: Cannot call method "setAttribute" of null

I'm stumped here.  I'm using the default "Create a user group in an organizational unit and set attribute "Group name" from the active directory plugin.  This is failing on one OU(that i know of, and the one that matters).  I'm getting error: item: 'Create a user group in an organizational unit and set attribute "Group name"/item3', state: 'failed', business state: 'null', exception: 'TypeError: Cannot call method "setAttribute" of null (Workflow:Create a user group in an organizational unit and set attribute "Group name" / Change "Group name (pre-Windows 2000)" attribute (item3)#10198)'

The weird thing is, I can test it on other OU's and it works fine.  The service account is an enterprise admin, I even went and delegated control. But it's still failing. 

**The group is getting created, it's just failing to set the pre windows 2000 name.  We are doing integrating AD with our linux and it is dependent on that naming**

Any ideas?

0 Kudos
3 Replies
vmc9
Contributor
Contributor

did you ever find a fix for this issue

0 Kudos
bsaxe
VMware Employee
VMware Employee

Does it create the user group and is it visible in the inventory after the workflow runs?

If you try to set the attribute on said group after it already exists, does it still throw the exception?

0 Kudos
vmc9
Contributor
Contributor

The group gets created in AD but the SAM Account name is not set properly
I made a copy of  "Create a user group in a group and set attribute "Group name (pre-Windows 2000)" workflow.

 

Modified the workflow variables so it would create in a OU and not another group.

I added a script to run at the end of the workflow to go back and set the win-2000 attribute. THat is where the error is generated.
script. It looks like the getUsergroupFromContainer action is not finding the group and is returning null.

System.log("newGroup: " + newGroup)
newGroup.setAttribute("sAMAccountName", groupNamePreWindows2000);
newUsergroup = newGroup;
System.log("newUsergroup" + newUsergroup)

 

I checked the value of newGroup and it is null.

 

When I check the vCO inventory I do not see the object although it does exist in AD. The OU has a large number of objects.

0 Kudos