How to get an access token after authenticating with SAML? Skip to main content
https://support.okta.com/help/answers?id=9062a000000quqmqas&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
William Riley-LandWilliam Riley-Land 

How to get an access token after authenticating with SAML?

I have a basic SAML SSO/SLO working with a test Hapi (NodeJS) app.  I have been able to store name_id and session_index after a successful SSO login.  Is there a way to use these values to get Okta to create an access token for the user?  Is there a way to use these values to get the user ID or session ID, so that I can make API calls related to the user that logged in through SAML and their session?  Is there any documentation on using the React sign on widget in a SAML app?

Thanks for your help,
William
Andrei AldeaAndrei Aldea (Okta, Inc.)

Hello William,

Based on our documentation for Authentication (https://developer.okta.com/use_cases/authentication/), Oauth2 (https://developer.okta.com/docs/api/resources/oauth2#request-a-token) (which I assume is what you would be using once the access token was generated) and SAML (https://developer.okta.com/standards/SAML/index), I don't believe that is possible.

However, I recommend opening up a case with Developer Support (email: developers@okta.com) and running the question by them. At the very least, they should be able to confirm if I am correct - and if not, they should be able to assist with the implementation.

 

Regards,

Andrei Aldea
Technical Support Engineer
Okta Global Customer Care