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 @...
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...
Thanks