Quantcast
Viewing all articles
Browse latest Browse all 6251

Create AD:User with a UPN defined

I have a workflow using the createUserWithPassword action. This creates an AD:User object fine. Unfortunately the action doesn't create an AD User object with a UPN defined. Instead the user is just created with the UPN as a @...

 

Image may be NSFW.
Clik here to view.
UserWithoutUPN.jpg

 

I duplicated the default action and modified it  to include the userPrincipalName in the parameters.

 

if(password){

  if(password != confirmPassword){

  throw "Unable to create a new user: Password not confirmed";

  }

}

try {

  container.createUserWithPassword(accountName, password, domainName , displayName, userPrincipalName);

}

catch (ex) {

  throw "Unable to create a new user: " + ex;

}

 

I added a scriptable task before the action runs to populate the userPrincipalName attribute and linked this to the action.

 

var userPrincipalName = accountName + "@corp.local";

System.log("User Principal Name for Account Creation is: " + userPrincipalName)

 

Unfortunately the accounts in AD still get created without a UPN. Any ideas how I create users with a UPN defined. The API explorer shows this as an option...

 

Image may be NSFW.
Clik here to view.
userPrincipalName.jpg

 

Thanks

Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 6251

Trending Articles