The CreatorCon Call for Content is officially open! Get started here.

Does ServiceNow support Google service accounts to access Google applications

rexcore
Kilo Expert

I am near rollout of an integration with Change Requests and Google Calendar using OAuth 2.0 token support in Helsinki.

Thanks to josh.nerius who covered retrieving a refresh token on the 9-23-2016 edition of Live Coding Happy Hour, and Chuck Tomasi for referencing the "fix".

Since this mechanism requires the Change Request submitter or approver to be logged in to Google with privileges to write to the target calendar, I would like to use the Service Accounts supported by Google.

I haven't found ServiceNow documentation to easily support using the public key to create an access token for a REST request.

It looks like there is enough information to support this with javascript in ServiceNow, but I'd rather not go that direction due to development time and maintenance support in the future.

Thanks for any recommendations or documentation links.

Rex Core

UCSC

1 ACCEPTED SOLUTION

rexcore
Kilo Expert

I ended up using the  <script src="https://apis.google.com/js/client.js"></script> from a UI page invoked from a UI Action, and not the service account which required domain access to the Google API.

The good news is that Madrid now has JWT credential support!

View solution in original post

7 REPLIES 7

Chuck Tomasi
Tera Patron

Good question Rex. I'd be interested to hear what josh.nerius has to say. I haven't dealt with Google service accounts (yet).


Thanks, Chuck, I'm hoping josh.nerius has some more magic for us...


rexcore
Kilo Expert

Since I don't have an easier solution, I'll start coding the service account token request as documented at



Using OAuth 2.0 for Server to Server Applications   |   Google Identity Platform   |   Google Develo...



When I get something working, I'll do my best to get it posted here.


Cheers,


Rex


Hello rexcore,



We are looking to use a Google service account with 'G Suite Domain-wide Delegation' as well. Were you able to get it to work? I was hoping to be able to use SN's out of box OAuth support, but that seems to be geared toward 3-legged flows. Is that the case?



If you did build it yourself, did you use the Certificate encryption APIs for JWT signing?