Is it possible to use an External OIDC provider with an inbound REST call.

Gabrz
Mega Contributor

We have a need to interact with ServiceNow via the Table API REST service.

In ServiceNow I've created an Oauth Client, and using the client_id and client_secret I'm able to get a token based on the username en ServiceNow password via https://<instance>.service-now.com/oauth_token.do.

Everything is working fine, with that token I'm able to GET and POST records (incidents).

But, we don't really use the ServiceNow password. All users connect in the browser with Single Sign On, with their Active Directory password.

So, I was wondering if it is possible to create a ServiceNow Authentication Token with my Active Directory password? And use that token to call the Table API. Can I configure an External OIDC Provider(Auth0 or Azure AD) for that? 

If so, are there examples how?

 

1 ACCEPTED SOLUTION

Gabrz
Mega Contributor

I figured it out!

 

Instead of the Client ID in the External OIDC Provider I used the audience. And now I am able to retrieve data with an external token.

find_real_file.png

View solution in original post

8 REPLIES 8

Karthik116
Kilo Explorer

Hi Gabrz,

It's great that you found the solution and posted here, I'm working on the same requirement and i followed your steps to create an Application on Auth0. I have got the access token from Auth0 but when i send this to inbound table API GET method, i'm getting error message


"error": {
"message": "User Not Authenticated",
"detail": "Required to provide Auth information"
},
"status": "failure"
}

 

FYI, i have changed client ID on servicenow OIDC provider to audience from Auth0. 

Could you please help me on this issue?

Thanks!

Gabrz
Mega Contributor

Hi,

Sorry for the late response. Do you still need help with this issue?

This document helped me a lot:

https://hi.service-now.com/kb_view.do?sysparm_article=KB0719167

 

Regards,

Gabrz

Karthik116
Kilo Explorer

Thanks, this article helped me https://hi.service-now.com/kb_view.do?sysparm_article=KB0720547

udaykemburu
ServiceNow Employee
ServiceNow Employee

Please refer to KB

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0778342