Import sets getting cancelled with below error message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2024 03:11 AM
We are encountering an issue while executing the "Scheduled Data Imports" process in ServiceNow. The execution is being canceled with the following error message:
Error executing script : org.mozilla.javascript.JavaScriptException: Error: Unable to make a connection to Intune via Graph API call. Please check your credential configuration. Check system log for more details. HTTP return status code was 401 (sys_script_include.6a4e0342773310102dfb23446810611c.script; line 659)
Permissions & credentials are verified , everything looks good. Request assistance in identifying and resolving the root cause.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2024 04:08 AM
Hi @Harish13696 ,
Check below.
- Update Client Secret: If the client secret has expired, generate a new secret in Azure AD and update it in ServiceNow
- Check API Token Scope: Ensure the token being used has the necessary Graph API permissions. Test the token using tools like Postman or Curl.
- Debug Script Include: Add debug logging in the Script Include around line 659 to log the token, request payload, and API response.
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2024 02:17 AM
We had update Client secret with new one and token is generating
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2024 05:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2024 04:44 AM
is it happening all the time or intermittently?
Seems when the scheduled import ran at that time it was unable to connect and gave 401 error
401 means incorrect username and password or credentials.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader