Can user's groups be returned with session token?

I am able to successfully perform the initial login for a user but the user’s groups are not returned with the response. Is there a way to return the user’s groups at this point or does a separate call need to be made to get them?

I don’t think you can get anything else inside a sessionToken. You can call this endpoint to get the groups /api/v1/users/${userId}/groups (Users | Okta Developer) just use me instead of userId

@phi1ipp - Thank you for responding. At this point when I make the call to get the groups I get an unauthorized response. I am sending in the session token received from the auth call as a bearer token. What needs to be done differently?

To be able to make this call you need to have a session established with Okta. You need to do a process of “exchange sessionToken to an Okta cookie”. Re-try after that

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