How do I get the user's ID via SAML integration? Skip to main content
https://support.okta.com/help/answers?id=9062a000000bmwtqai&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:
Carl HowellsCarl Howells 

How do I get the user's ID via SAML integration?

I'm developing Okta integration via SAML for my company's product.  I'd like to get the user's ID (as assigned by Okta) in order to map the SAML user to an account via a unique, immutable identifier.  But I can't just use ${user.id} as an attribute value, as it seems the user object is only the user's profile, and the user's ID exists above the profile.

How can I get this value as either the NameID in the SAML response, or as an attribute?
Best Answer chosen by Carl Howells
Gabriel SrokaGabriel Sroka (Okta, Inc.)
Hi Carl
In the SAML Wizard, you can use user.id in an attribute. See "Attribute Statements" in:
https://help.okta.com/en/prev/Content/Topics/Apps/Apps_App_Integration_Wizard.htm
 

All Answers

Gabriel SrokaGabriel Sroka (Okta, Inc.)
Hi Carl
In the SAML Wizard, you can use user.id in an attribute. See "Attribute Statements" in:
https://help.okta.com/en/prev/Content/Topics/Apps/Apps_App_Integration_Wizard.htm
 
This was selected as the best answer
Carl HowellsCarl Howells
Thanks Gabriel.  I shouldn't have generalized from the username field like that without testing, I suppose.