Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to get user token when service now is sso authenticated to pass authentication to another application

manish64
Giga Guru

Hi ,

       I have scenario where i need to pass user token from service now to another application  to get authenticated.As our service now instance is sso authenticated with azure ad . Do we have that information stored in servicenow which i can use  and pass information to another application.

11 REPLIES 11

DirkRedeker
Mega Sage

Hi 

Are you talking about user authentication, or about machine-to-machine?

 

BR

Dirk

i am talking about user authentication from azure to servicenow then servicenow to some application 

Hi

In that case, you do NOT get any token from ServiceNow, but from AZURE AD, which logs you in. Your token is "carried" in your browser as long as you do not close it and the session is configured to be valid (on AZURE).

On Azure, you wil define the "lifetime" of the authenticated user - without refreshing it.

"Other" Web-Sites (like ServiceNow as well), can make USE of THAT token and authenticate you locally.

Does that make sense for you?

BR

Dirk

You say that the token is "carried" in the browser after an Azure AD login, but I can't find that token anywhere. I've searched through the cookies, local storage, all the places I could think of. Where is it? Or do you have to customize the Sign in process to store it in the first place?

@DirkRedeker That's not possible, because ServiceNow - Azure authentication is on SAML based.