servicenow integration with office 365 using oauth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2017 05:04 AM
i m looking at pulling information from my servicenow instance and display in Office 365 SHarePoint site
want to use oauth authentication to query servicenow via REST.
i see the option of grant type as password or token in the REST call
i m looking at not passing the username/password but use client id to make request to servicenow and then user grant.
kindly suggest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2017 05:27 AM
thanks Josh. I m able to get the bearer token using Javascript but post that when i make a GET request to the incidents table i get CORS error as i m making the request in Javascript, is there a way we can set access origin header in servicenow?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2017 09:11 AM
ServiceNow does support CORS - see REST API CORS support.
Because you're doing all of this client-side in JavaScript, I'd recommend looking at OAuth implicit grants instead of Authorization Code Grant Flow. Implicit Grant Flow is typically used when the Client Secret cannot be protected, and sends an Access Token in the redirect URL instead of an Auth Code. Initiating the flow will be very similar to what you're doing now, but the second token retrieval step is no longer necessary.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2017 05:30 PM
Hi josh.nerius and @chuck,
I am having a similar problem with Riddhi but not exactly the same. What we need to do is building a webpage that will use ServiceNow as the backend. We tried to call the /oauth_token.do to use Oauth authentication but it has CORS error. We then tried to set up CORS to allow the domain but Oauth endpoint wasn't in the choice option so we still couldn't access the instance via Oauth. Is there any solution? We are on Geneva so we don't have the option of setting up Oauth for external client...
Running out of ideas...
Thanks!