Why userinfo does not return full user inforamtion

Hello there - I am using the following work flow to login and retrieve user information, but it only returns part of user information. Why and how to fix it? Thanks!

  1. use the following to authorize
    okta.com/oauth2/default/v1/authorize?client_id=XYZ" +
    “&response_type=code&scope=openid&redirect_uri=https://localhost:44314/home/index&” +
    “state=stateABCDEFG&nonce=g5ly497e8psxyz”;
  2. Get the code it returned.
  3. Use okta.com/oauth2/default/v1/token with “grant_type” of "authorization_code to get access token
  4. Get the access token and use okta.com/oauth2/default/v1/userinfo to get user information.
  5. Only the following information is returned.
    {“sub”:“00u2mrya9kGV9JvGo5d7”,“accesslevel”:5,“groups”:[“Everyone”,“HPMS”]}

Why it does not return full user infor? If I want to return access token and user information in step 1 (authorize), what parameters I should use?

Thanks

You need to request profile scope additional, when you do a call to /authorize

1 Like

Thanks. This resolved the issue.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.