getting an error when doing oauth based authentication

Ravish Shetty
Tera Guru

Hi all

 

getting below error of 'User Not Authorized' and 'Missing required API access scope: test' when doing OAuth based authentication. the bearer token used is correct because when i use an incorrect one, i get a different error.

 

RavishShetty_0-1776179527129.png

 

below is the oauth setting in servicenow

 

RavishShetty_0-1776179666144.png

 

 

Thanks

Ravish

 

2 REPLIES 2

Tanushree Maiti
Kilo Patron

Hi @Ravish Shetty ,

 

Navigate to the Authentication Scope table and create the following scopes:

  1. table_read
  2. table_read_write

 

refer: Restrict access available to OAuth Client using REST API Auth Scopes

        Limit the access granted to an OAuth client by using REST API authentication scopes.

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

AndersBGS
Tera Patron

Hi @Ravish Shetty 

 

Have you remembered to set baerer in the header?

Have you ensured to provide correct user access?

 

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/