Add user to Ad group

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2016 09:31 AM
I have a requirement to add users to AD groups via ServiceNow Orchestration. What is the best way to do this? I thought it would be update AD object but i'm note sure what to put in Object data field.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2016 11:26 AM
I have gotten this working. Your mid server service must be running under an AD account with these permission and then in service now under Orchestration > Credentials you need to put the windows credentials for this account.
Here is what my powerschell script looks like now. The workflow.scratchpad variables are coming from a run script I have setup earlier in the workflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2016 09:20 AM
That makes sense but does that mean I can ever only write to one AD? I am trying to test with a QA AD and will need to be able to do AD actions agains multiple Domain Controllers depending on the user/request.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2016 10:16 AM
We have multiple domains that all have a trust relationship. My workflow scratchpad variables sending the distinguished name for both the group and the user account.
eg. CN=Jeff Smith,OU=Sales,DC=Fabrikam,DC=COM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2016 02:08 PM
That makes sense thanks Brian, I think I have what I need to set this up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2016 07:22 AM
Brian,
I am in the same situation, I need to add users to group in AD.
My users are in a string var called "workflow.scratchpad.GrMem" separated with User by ",".
I need to add those users to group in AD.
Please help me with Power shell script.