Microsoft active directory v2 spoke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hi all,
I have a new requirement to update the Employee Number in Active Directory (AD) from ServiceNow.
We have created a Service Catalog Item where the form contains:
User for whom the update is required
New Employee Number
Process flow:
User submits the catalog item request.
Flow triggers Manager Approval.
If the manager approves the request, the Employee Number should be updated in AD automatically.
If the manager rejects the request, the RITM should be updated to "Request Cancelled".
Could anyone please suggest the best approach to update the Employee Number in AD from ServiceNow after approval?
how to call actions in flow to update AD once approved
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hi @bandlaa
Use the Microsoft AD v2 Spoke in Flow Designer to create a flow that triggers on user record changes, searches AD, and uses the "Update Object" action.
Prerequisite:
- Microsoft AD Spoke: Installed in ServiceNow.
- MID Server: Configured and running to connect to on-premise AD.
- Credentials: AD service account with write permissions to the employeeID
The Update AD Object activity updates an object in Windows Active Directory.
This activity only replaces existing values with new values. It cannot add new values to AD records such as adding a new group member to an AD group. For complex AD operations, use the Run PowerShell activity instead.
For Powershell activity ,get the script from here: Look up user in Active Directory from Flow Designer
Sample steps:
Open Flow Designer and create a new Flow (like "Update AD Employee Number").
Set trigger to "Record Updated" on the sys_user table, filtering for when Employee Number changes.
Use Microsoft AD Spoke > Get User to find the user in AD by SAMAccountName or Distinguished Name.
Use Microsoft AD Spoke > Update Object.
- Object DN: Drag the Distingished Name from the Get User action.
- Attributes: Enter employeeID (or employeeNumber) and map it to the Employee Number from the trigger record.
Save and activate the flow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Thanks for the quick response. I am totally new to this concept. I installed and configured the credentials, then started the flow. Below, I am attaching the flow, and can you please help look at this and what steps I have created after step no 3 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
