ServiceNow: OAuth Authentication
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 01:07 AM
Hello All,
Good Afternoon. How are you?
I have created an application registry for OAuth Authentication by which we got the CLIENT ID and CLIENT SECRET.
Now I have to get the REFRESH TOKEN for which I went to POSTMAN and followed the below KB Article:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0778194#:~:text=Navigate%20to....
After following the second paragraph "Obtaining the Access and Refresh Token using Postman", I am in Pot getting the result in POSTMAN.
Getting "Access Denied" Error in POSTMAN.
In the BASIC Profile, have given "security_admin" role and tried the same.
Kindly advise how to overcome the error.
Thanks,
Ram Prakash K R
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 10:07 PM
@rampikutva Again I am coming on same point ,please check once ACL on oauth_credential table.
I know about OOB ACL if user has snc_internal & username is same as user field ,then it allows to read token.
Or you can quickly check on UI :
Remove tick of field web service access on sys_user table for your API user .
Impersonate as API user, first verify if you are able to read that credential table and no security error.
2nd use background script or any other way to read issued token field related to API (if no record in credential table then take any existing record update name field as your API name) , if you are able see result.
Means issue is not related to access something else.
Can you also confirm whether you have restmessage or using for table API?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 12:51 AM
Hello @Abhay Kumar1 ,
Thanks for the response.
Our API User able to read the Credential Table.
FYI - I am following the below KB Article:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0778194#:~:text=Navigate%20to....
And now in "
Obtaining the Access and Refresh Token using Postman" Paragraph which is not sending us the "Refresh Token" as expected.
Thanks,
Ram Prakash K R