Hi all,
I would like to integrate web app (Java/Spring Boot) with Okta.
For that I’ve created Okta App (Web) with OpenID.
I’ve add myself as User and Assign myself to this newly created app.
Managed so far to get code (+state) (1st step in Authorization Code Flow) and now I’m exchanging
this code for OpenID Token.
Followed tutorial so far and I’m getting Okta Token back: type, access_token, scope, expires in and id_token.
Claims in id token looks like this:
{
“sub”:“00ubjxeinIPBMY3NA5d6”,
“ver”:1,
“iss”:“https://dev-90739639.okta.com/oauth2/default”,
“aud”:“0oaboia43VYFqsjRg5d6”,
“iat”:1615892770,
“exp”:1615896370,
“jti”:“ID.VIWi1ZZyz0xrU4nFdFYLVVT2GDEO9xDF4AXH3svtjmg”,
“amr”:[“pwd”],
“idp”:“00objxeesZGJZsyyw5d6”,
“nonce”:“foo”,
“auth_time”:1615892758,
“at_hash”:“wglL65gmzft2LnpVaNZwBg”
}
Now here comes the question …
I need somehow to get info about Organization / Tennant of the Authenticated User. Email/Username is not just enough.
Can someone jumps in and tell me how to obtain that information?
P.S. Integrating with other Auth. providers (e.g. Google, there is a Claim “hd” a.k.a. HOSTED DOMAIN that I could use, or for Microsoft there is “tid” a.k.a. TENANT_ID)