Unable to create a new user by using create AD object activity by using orchestration

udayaprakash668
Giga Contributor

Hello,

I am unable to create a new user in AD by using Create AD Object activity in orchestration.I have create a service catalog which contains FirstName,LastName,Manager,Department,Title.So when i try to give those values as inputs to Object Data in Create AD Object activity, i am getting Constraint Violation error.

Please find the below code that i used in Object data for Create AD Object activity.

{"givenName" : "${workflow.scratchpad.f}",

"SN" : "${workflow.scratchpad.l}",

"title" : "${workflow.scratchpad.t}",

"manager" : "${workflow.scratchpad.m}",

"department" : "${workflow.scratchpad.d}"}

New user is getting created in AD when i give upto 4 inputs in the above object data. If i gave > 4 inputs in above mentioned object data then i am getting Constraint Violation error.

Regards,

Udayaprakash

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Udayaprakash,



I guess the error is coming for 1 or more than 1 attribute. Constraint is violated so this error is coming.


The following attributes seems fine for me


a) title, department, givenName


Just check this url User Attributes - Inside Active Directory



It contains the ad attributes


You have given SN try using "sn" instead of capital case



For which attribute you gave value as less than 4 and it worked ?


Check constraint for that attribute on microsoft website



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

I am unable to add a user to multiple groups by using "Add users to group", as it's not taking more than 1 groups for Group Name in Add users to group activity.


Hi Udayaprakash,



you will have to iterate over each group and this activity has to be repeated those many number of times. This activity is built to add user to one group at a time.



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Udayaprakash,



Are you still facing the issue for creating AD user?



Regards


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader