How do you create a user to a specific OU using the Microsoft AD Spoke of Integration Hub Please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2022 03:09 AM
Hi All,
Can anyone please help me , how can we add users to the Specifi OU in Mircrosoft AD using Servicenow Integration Spoke..
I have create user function where i can create users in AD but i dont have any filed OOB to specify the OU name there
Can anyone help if anybody has already done this...
Thank you....
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2022 10:32 AM
Hi Ambika,
I made a custom action for that with a few parameters. It runs a powershell script via mid server to place the user in the right OU.
If the user type for example is of a "kiosk" user then the OU is this
Otherwise the user is a full user and then move it to another OU.
This is the code.
import-module activedirectory;
if($user_type -eq "KIOSK"){
Get-ADUser -Server $computer -Identity $sAMAccountName | Move-ADObject -TargetPath "OU=KioskUsers,OU=xxx,OU=xx,OU=xx,OU=xxx,DC=xx,DC=xx"
}
if($user_type -eq "FULL"){
Get-ADUser -Server $computer -Identity $sAMAccountName | Move-ADObject -TargetPath "OU=Users,OU=xxx,OU=xxx,OU=xxx,DC=xxx,DC=xxx"
}
Hope this helps.
Kind regards,
Robin
Kr!
Robin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2022 08:37 PM
Hi Robin can you please share the screenshot of your flow how it worked, i have the same requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2022 12:04 AM
Hi Sravani,
Even better to use the OOTB action within flow designer.
Kr!
Robin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2022 12:25 AM
Hi Robin this flow will work as below