Updating Manager Fields in ServiceNow Using Azure AD Object IDs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2024 07:34 PM
In the sys_user table, each manager has an Azure AD Object ID. I want to use this Object ID in a business rule to update the Direct Manager and Manager Level 1 fields with the appropriate names. All the necessary data is in the sys_user table. How can I achieve this?
- Azure AD Manager: Each user has a unique Object ID in a specific column.
- Direct Manager: Populate the Direct Manager field with the name corresponding to the Azure AD Manager’s Object ID.
- Manager Level 1: Populate this field with the name of the Direct Manager’s next-level manager from the sys_user table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 12:28 AM
So on a user record you have the object ID of the direct manager and the manager level one? Is that what I understand from your question?
If so, just create a flow on change of that ID that does a lookup to the sys_user table to find the record with that number and put the user record in the field (if it's a reference field) or the name from the user record (if it's a string field).
For a business rule, it's the same logic, but a flow already gives you the tables and fields.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2024 06:12 AM
Thank you for this. We were able to address it using the 'client script'