Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Can we get all the latest updated users from Azure AD Portal to ServiceNow

Asish1
Tera Contributor

Hi,

 

Can we get all the latest updated users from Azure AD Portal user management to ServiceNow through Rest message.

If yes can you please help..

 

Thanks,

Asish

2 REPLIES 2

Amit Gujarathi
Giga Sage
Giga Sage

HI @Asish1 ,

I trust you are doing great.

Yes, you can retrieve the latest updated users from Azure AD Portal user management and sync them to ServiceNow through a REST message. Here are the steps to achieve this:

Step 1: Configure Azure AD Portal

Configure Azure AD Portal to expose the user management API. You can follow the instructions in the Microsoft Azure AD documentation to create an App Registration and configure permissions to read users.

Step 2: Create a REST Message in ServiceNow

Create a REST message in ServiceNow that uses the Azure AD Portal API to retrieve the latest updated users. You can configure the REST message to use OAuth 2.0 authentication and specify the Azure AD Portal endpoint URL.

Step 3: Create a Scripted REST API

Create a Scripted REST API in ServiceNow that invokes the REST message and returns the latest updated users in a JSON format. You can use JavaScript to parse the JSON response and extract the required user data.

Step 4: Schedule a Job to Sync Users

Schedule a job in ServiceNow that invokes the Scripted REST API periodically to sync the latest updated users from Azure AD Portal to ServiceNow. You can use GlideRecord API to insert or update the user data in ServiceNow.'

 

Please Mark My Response as Correct/Helpful based on Impact

 

Regards,

Amit Gujarathi


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



Asish1
Tera Contributor

Hi @Amit Gujarathi 

Thanks for the reply!!

Similarly to users can we sync it to group management with the group details (users, name, id, etc.) through REST API

 

Thanks,

Asish