- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2024 04:48 AM
Hi all,
I'm experimenting with my Rest API through Postman. I've given the credentials for authentication. Itt works perfectly for the Post method, creating an incident but it encounters an "User not Authenticated" error when applied to the Get method
What could be a reason behind this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2024 03:17 AM
Hi All,
Thank you for your replies. The problem originated from a custom role that was blocking the GET operation. Once the role was assigned to the service account, everything worked as expected and the error just disappeared.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2024 05:49 AM
@Sandhya23 Sharing the below link for reference,
Please mark this as helpful and accept it as a solution if this resolves your query.
Thanks,
Sujatha V.M.
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2024 04:23 PM
Hi Sujatha,
Thanks for sharing the link. However, it does not solve my problem. I am using the right user ID and password. this works fine for the POST operation and I am able to create incident in the system with the credentials in the postman. But it does not work for the GET operation. I am getting the mentioned error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2024 08:17 PM
Hi @Sandhya23
To debug it further, I would suggest you to try this out first using ServiceNow REST API Explorer available within your instance. Test for GET method. If that works out for you, then definitely it has something to do with your credentials.
If the GET method works, take out the ServiceNow script or PowerShell or Python script from there, put your credentials into it and retry.
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2024 10:08 PM
Share the end point you are trying to use. Amit suggested right, you can check REST APIExplorer. Make sure you imporsante with the user you created for basic auth.