- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2020 07:04 AM
Hi all,
I have created an app registry for the Service Graph Connector for Microsoft Intune app in ServiceNow.
I have created an app registry in azure too and all the setup looks fine.
But when clicking on Get Oauth token I am getting the HTTP Error 401 - Unauthorized.
I dont know why though, as I have the exact same setup for my dev instance and that is working fine.
Just when setting it up in test it is giving this error.
The only difference between the 2 instances that I know of, is that test is SSO using Azure AD and Dev is not.
When i first clicked Get Oauth token, it asked me to login, then asked for admin approval, which I got an admin user to enter, and after that I am seeing this error.
Can someone advise please?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2021 02:03 PM
I had the same issue and this link really helped me. https://www.linkedin.com/pulse/servicenow-outbound-web-services-oauth-20-how-handle-r%C3%A9da-osseili/
The error that SN returned by default is very misleading since it hides the actual detailed error message. We need to add some logs in the script include (OAuthUtil) that parse the get token response, so we can understand the exact issue.
My particular issue was that I was using the wrong client secret. I used the id instead of the actual secret value. Silly me, I know!
Once you enable the log in OAuthUtil, The error message was able to lead me to resolve my issue.
Hope this will help someone in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2021 08:07 AM
Did you ever manage to resolve your issue with Tower and ServiceNow? I too also am getting the "HTTP Error 401 - Unauthorized" error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2022 05:23 AM
Hi KyleRoss,
Did Elumalai ever respond? Have you been able to resolve your issue with receiving the 401? I just got Tower and was working on this and got the same 401 UnAuthorized response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2021 12:44 AM
Hi,
Basically, Servicenow doesn't know how to handle/parse the response from the Oauth provider, this article should answer your question:
https://www.linkedin.com/pulse/servicenow-outbound-web-services-oauth-20-how-handle-r%C3%A9da-osseili/
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2021 02:03 PM
I had the same issue and this link really helped me. https://www.linkedin.com/pulse/servicenow-outbound-web-services-oauth-20-how-handle-r%C3%A9da-osseili/
The error that SN returned by default is very misleading since it hides the actual detailed error message. We need to add some logs in the script include (OAuthUtil) that parse the get token response, so we can understand the exact issue.
My particular issue was that I was using the wrong client secret. I used the id instead of the actual secret value. Silly me, I know!
Once you enable the log in OAuthUtil, The error message was able to lead me to resolve my issue.
Hope this will help someone in the future.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2021 07:33 AM
Thanks for your comment Shawna, it helped in resolving my issue. This exactly happened to me, I did not use the actual secret values, but rather was using the client secret id.