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

API Authentication From External Platform

SohamN
Tera Contributor

I am working on an microservice that takes data and sends a post request to the table api. 

I have currently implemented this using basic auth and an admin account. I want to make it so that the api authorizes through the users servicenow SSO or existing login and instead creates the ticket using their account details.

Essentially the incident should get created using the current users servicenow id instead of me requiring to create an admin account to do it.

I am struggling to find the necessary resources, would appreciate if someone could guide me.

3 REPLIES 3

Randheer Singh
ServiceNow Employee
ServiceNow Employee

Hi @SohamN ,

 

You should consider using the OAuth Authorization code flow to meet your requirements.

Thanks,

Randheer

Thanks Randheer,

 

This seems like the correct resource and I will get started on implementing it.

I just want to confirm if this will launch a popup that will prompt the user to sign in/automatically sign them in through SSO. I see a redirect URL, I don't wish to close my current tab so would this be an issue?

Hey @Randheer Singh 

 

Thank you so much, this seems like it is the right resource. I just want to make sure of one thing, this opens a new window in a popup right? Where the user can authetnicate using SSO/login... 

 

I don't want my existing tab to close when the button to create the incident is clicked. Integrating this auth is getting quite tough since I obviously can't just pass passwords as plain text.