
EdwardC.73916 (Customer) asked a question.
Hi,
I assigned two groups to my application, Read-Only and Read-Write. I am trying to use the hasAnyGroups directive to check which group my user is in an angular app that I wrote. I placed a debug point in the hasAnyGroups(groups) function in okta-angular.js and neither if (idToken.claims[key]) nor const userInfo = yield this.oktaAuth.getUser(); contain any groups. I tried one user who is part of one group and another who is part of another.
I using a dev instance of okta if that helps.

Hello @EdwardC.73916 (Customer) Thank you for reaching out to our Community!
It seem that the groups claim is not coming back in your token. You should check if a raw token contains the groups claim you make or if sending the access token to userinfo returns it.
Please also review our documentation on this:
https://developer.okta.com/docs/guides/customize-tokens-groups-claim/
My advice would be to leverage the Okta Developer forums for this type of questions and take advantage of their expertise.
https://devforum.okta.com/
Thank you. I was able to figure it out thanks to your answer.