Configuring OAuth External OIDC Provider for inbound REST API requests
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2018 03:18 PM
Greetings,
I have been attempting to use an External OAuth Provider to allow access to my SN instance's REST API. I am able to generate the needed token but when making a API request I receive a 401 error. When checking the SN error log I have the error:
Cannot find oauth_oidc_entity for issuer https://{oauthIssuer} with any of the following client_ids: {issuerApplicationId}: no thrown error
I have a 'External OIDC Provider' configured for this and am not clear on where the error is pointing me.
Thank you.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-31-2018 11:24 PM
Hi Jono,
So you are trying to consume ServiceNow endpoint via OAuth.
Are you getting the access token in the first step?
Can you share how are you calling the API?
Regards
Ankur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2018 11:02 AM
Hi Ankur,
Thanks for replying. being new to ServiceNow I'm going in the deep end. I'm actually trying to use Azure AD to manage users and issue authorization. I can obtain a token from AD, the error appears when I call SN.
I am calling the API:
https://{instance}.service-now.com/api/now/table/incident
Headers:
GET /api/now/table/incident HTTP/1.1
Host: {instance}service-now.com
Authorization: Bearer {Access_Token}
Accept: application/json
cache-control: no-cache
There has to be a disconnect between AD and SN, I'm not clear on where.
-Jono
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2018 11:49 AM
Is your Open Id connect passing you an id_toke ? Apart from Access token and Refresh toke ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2018 11:54 AM
Hi Aman,
Yes, I receive all three.