Orchestration Active Directory - Create and update AD Object

justx
Mega Expert

Hello community,

I've managed to create the AD user through Workflow (Orchestration) - Create AD Object, need help - I have some questions

Vivek helped me in the old thread.

Now I want to ask if anybody there could help me with the following:

When the user is created by the workflow I do not know how to make the workflow create AD User Email and Logon name

find_real_file.png

The above is created by the workflow.

And here everything is empty

find_real_file.png

When I create the user without the workflow, manually:

find_real_file.png

find_real_file.png

I want the workflow to create the logon name @company.com and create DOMAINname\username.
Also to populate First Name + Display name.

find_real_file.png

The above is my Create AD object.


Another thing which I want to know, is there any list with all workflow.inputs ?
How can I check what is inside u_user table ?
I understood about u_user.first_name and .last_name is taking from the table u_user the names, but how can I see if there is an option for Email ?


The missing attributes in the LDAP Viewer software I can see that the user manually created in the AD is having userPrincipalName , givenName, sn + displayName
But the created by the workflow is not having those attributes in the LDAP.

Any help will be highly appreciated.


Regards,
Niki

1 ACCEPTED SOLUTION

Hi Niki,



I believe the update AD activity looks for Samaccountname field in the AD. Samaccountname is a unique field in the AD. So before using update AD activity, add the Samaccountname field to Create AD activity itself.



"sAMAccountName":"${workflow.inputs.u_user.user_name}"



Once your account has samaccountname you won't get this error like missing



Regards,


Vivek


View solution in original post

19 REPLIES 19

Hi Vivek,



For ServiceNow Group in the AD, is it the same way as the Users ?



Type: Group
Again with some query to check if that group exist in the SNOW and if not to add it ?



For example query AD search filter must be like:



(sAMAccountName=${workflow.inputs.sys_user_group.name})



Or



(sAMAccountName=${workflow.inputs.u_user_group.name}) ?



Thanks,
Niki


Hi Niki,



Yes the second one,



(sAMAccountName=${workflow.inputs.u_user_group.name}) but make sure your workflow.input.u_user_group refers to sys_user_group table, Like how you created workflow.input.u_user variable refered to sys_user table.



Regards,


Vivek


Thanks!


you need to use Scratchpad variable in runscript and pass all the object data value then in your create AD activity you just have to pass the scratchpad variable.


Hi @VivekSattanatha 
Can you please tell me how to create a security group in AD using Orchestration?
Thank you!