Search code examples
oauth-2.0openid-connectokta

How to add user groups to ID token in Okta?


When using the authorization code flow, is there any way to receive user's groups in their ID token?

I've tried adding a "Groups claim filter" with "Matches regex" as .*, but it doesn't help.


Solution

  • Navigate to Security > API > Authorization Servers, and click on the default server. Click the Claims tab and Add Claim. Name it groups, and include it in the ID Token. Set the value type to Groups and set the filter to be a Regex of .*. Click Create.

    enter image description here