Authorization issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 08:02 PM
Hi
I have created a GET API to fetch the all open incidents by using rest API explorer and I have created basic user account for authentication its working fine with POSTMAN we are getting results ..but the issue is for same API if we are using any other account in ServiceNow (user name and password) we are getting authentication error can anyone suggest how to achieve this sharing screen shot for reference
Regards
shabbir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 11:36 PM - edited 12-21-2023 11:37 PM
Hi @Shabbir1 ,
It is possible but not recommended. If its just for testing purpose you can do it in lower environments. U can set the password from LIST view for the user account with whom u want to test & make sure u have provided necessary roles web_service_admin & rest_service, else it will not work.
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 08:25 PM
Hi @Shabbir1 ,
Agree with @Sainath N point normal Sso accounts will not work as they don't have the required roles. Whenever u create a service account for any api we need to provide web service role plus also check the web service account only on the user record so that it can be only used for API purpose n not for normal login.
Usually this roles are not given to any normal account hence u won't able to retrieve any data. Apart from admin account as it consist of all the roles.
Thanks,
Danish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 09:11 PM
Make sure you are using correct cred.
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2023 03:04 AM
Hi @Shabbir1
Is it any specific reason you need SSO here, as SSO is something which is internal and a user access alot of tools /platform internals to organization. It can be risk as well .
And for integration Service Account with basis role is a good option.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************