- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 09:01 PM
Hi All,
We are trying to integrate Azure AD to ServiceNow via OAuth Connection for the syncing of users. We also created a REST message and a scheduled job. But while testing, we found out that when we deactivate a user in the Azure portal, user is still active in the ServiceNow. It is not updating. Can you help us how we can achieve this? Thank you.
Scheduled job:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 09:14 PM
Hi @Rairai31
In your script, I don't see you are updating active field, you need to add that in order to reflect it properly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 09:14 PM
Hi @Rairai31
In your script, I don't see you are updating active field, you need to add that in order to reflect it properly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 09:19 PM - edited 11-27-2023 09:21 PM
Thank you very much @Aman Kumar S. But in the rest test message result it does not have any field for active so I am not sure what is the field name for that. We don't use auto provisioning in service now for users we use graph api. Do you know where can I see the active field? Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2023 09:30 PM
Org uses userAccountControl attribute which has numericals codes. Generally, if the value is 512, 514 the user acc is considered inactive, you can use that to maintain the active flag.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 09:45 PM
Hi @Aman Kumar S,
I really appreciate your response and helping hand. I was able to figure it out using this documentation from Microsoft - https://learn.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0 and used the accountEnabled property. Thank you.