REST API not able to authorize login
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2026 06:51 AM
We are looking to extract data via the REST API. When attempting to do we are presented with a 401 error in postman and also other methods of calling the endpoint. We are definitely using the correct username and password via basic auth. Co-pilot suggests it could be a permissions setup as we are using SSO for other accounts in the business. Could this be possible? How do I stop SSO interfering with the service account calling the API endpoint. This is unlike the other like this in the community forum, we don't wish to extract data from dev.
This is the endpoint being attempted api/now/table/sys_user?sysparm_limit=1
Example error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2026 10:55 AM
Hello @dshallcross
Below are my three recommendations for you to try:
1. Add "Admin" role temporarily to this user and then try with postman whether it is 200 or 401.
2. If you are able to login with this user into ServiceNow instance, then go to REST API Explorer and click (first option) "Retrieve records from a table (GET), tableName as User (sys_user) and hit Send (scroll down a little).
3. Try to create a same user with same roles in your PDI and validate it with POSTMAN.
Hope that helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @dshallcross , were you able to resolve this? I am also facing the same issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hey @dshallcross , in my experience a 401 with Basic Auth is almost always the credentials themselves rather than an SSO issue. Double check that the username and password are correct for that specific account, and make sure the account isn't locked out or expired in ServiceNow. SSO wouldn't typically cause a 401 on a direct Basic Auth API call — it would just redirect instead. Try resetting the password on the service account and retry with the new credentials first before looking at SSO config.