VMware Cloud Community
KGadowski
Enthusiast
Enthusiast
Jump to solution

AD Plugin - Problem setting userAccountControl for AD user account

Hi,

I am having a problem setting "Password doesn't expire" for an AD user account from Orchestrator. I am using an "AD:User" type object and am able to read the current userAccountControl value:

var attributes = clientUser.getAttribute("userAccountControl");

System.log("Attributes: " + attributes);

Output:  [I] Attributes: 512

However, when I try setting up the userAccountControl with: 66048 (512 + 65536 for DONT_EXPIRE_PASSWORD) I get this:

clientUser.setAttribute("userAccountControl",66048);

Output: Unable to remove attribute: Error while modifying element: Malformed 'userAccountControl' attribute value

Can someone suggest what am I doing wrong here?

Thanks

Kamil

Reply
0 Kudos
1 Solution

Accepted Solutions
KGadowski
Enthusiast
Enthusiast
Jump to solution

I found the solution:

<.setAttribute("userAccountControl"> requires string as an input, so the correct execution should look like this:

clientUser.setAttribute("userAccountControl","66048");

View solution in original post

Reply
0 Kudos
1 Reply
KGadowski
Enthusiast
Enthusiast
Jump to solution

I found the solution:

<.setAttribute("userAccountControl"> requires string as an input, so the correct execution should look like this:

clientUser.setAttribute("userAccountControl","66048");

Reply
0 Kudos