Using Third-party OAuth provider for authenticating Inbound REST API

DhananjayM
Tera Guru

Hi Team,

 

I am trying to figure out a way through which I can easily authenticate inbound REST API request (Table API)  using OAuth from a Third-party provider. I have gone through different community links but haven't really found if this is feasible or not, and if possible what is the recommeded way. Has anyone here attempted doing this?

Please help me out as we are final stages of development and this one piece is puzzle is still unresolved.

Thanks,

Dhananjay

27 REPLIES 27

gerritkuilder
ServiceNow Employee
ServiceNow Employee

Hello Dhananjay,



You did not mention the version you are running, I checked the docs for Helsinki and found the following documentation for inbound REST and OAUTH, it comes with a video and a command line example.



This information should give you a good start.



Kind Regards,



Gerrit Kuilder


Hello Dhananjay,



The link https://docs.servicenow.com/bundle/helsinki-servicenow-platform/page/integrate/inbound-rest/task/t_E...


This is for helsinki.



Regards,



Gerrit Kuilder



sergiu_panaite
ServiceNow Employee
ServiceNow Employee

Hello Dhananjay,



Have a look here:



http://wiki.servicenow.com/index.php?title=REST_API#OAuth_with_REST



and here:



OAuth Setup - ServiceNow Wiki



You must activate first the OAuth plugin to be able to register 3rd party OAuth providers.


Hope this helps.


Hi Sergiu,


I am Helsinki version of SN.


I've already went through this link and several others. My issue is even though I have created the 3rd party OAuth provider (SSO in our case) i get access_denied error



find_real_file.png



When I do below using curl I get error



curl -k -d "grant_type=password&client_id=<client>&client_secret=<secret>&username=<username>&password=<password>" https://<instance_name>.service-now.com/oauth_token.do



{"error_description":"access_denied","error":"server_error"}



Please note we do not store user's password in our instance and rely on SSO server for authentication.



Thanks,


Dhananjay