
User16796622505165838451 (Customer) asked a question.
I have successfully created a custom application and I'm able to log in via the code authorization flow. However, the ID token created by Okta contains only exactly 10 groups while the user is in many more. I added a groups claim filter with .* so this cannot be the issue. I've read that there is a limit of 100 groups but I only get 10 when it should be around 30. Any ideas what the problem could be?

Hello @User16796622505165838451 (Customer) Thank you for reacting out to our Community!
As per our documentation, for you to be able to send the groups the setup should look like this:
"In the Group claims filter section, leave the default name groups (or add it if the box is empty), and then add the appropriate filter. For this example, select Matches regex and enter .* to return all of the user's Groups. See Okta Expression Language Group Functions for more information on expressions."
Please also see our articles below :
https://support.okta.com/help/s/article/OIDC-Claims-Which-Should-Contain-AD-Groups-Only-Contain-Okta-Groups?language=en_US#:~:text=This%20can%20happen%20if%20there,filter%2C%20then%20the%20request%20fails.
https://developer.okta.com/docs/guides/customize-tokens-groups-claim/main/#add-a-groups-claim-for-the-org-authorization-server
Additionally if you need further assistance we recommend to leverage the Okta Developer forums for this type of questions and take advantage of their expertise.
https://devforum.okta.com/
Community members help others by clicking Like or Select as Best on responses. Try it today.
The problem was that the missing groups were "external" groups from Google Workspace. Using a similar approach as for Azure AD groups made them appear.
Suggestion: the documentation for adding these external groups could be extended because right now it only mentions Azure AD groups. Also finding the correct application ID to use in the groups claim expression is not very well documented.