Single Page App authZ based on group membership


I’m (very) new to the Okta tech and wanted to check something before I get started.
If I want to restrict access to a component (page) of my Vue app so that it’s only accessible by members of a certain Okta group the correct pattern is to add ‘groups’ to the scopes of the OIDC provider for the SPA and then to parse the ID Token JWT to see if the group particular group is returned as a claim?
Does that sound about right please?

Yes. This is the approach I recommend.

So I can call
and it works as expected but as soon as I add %20groups to the scope parameter I get

I’ve configured the groups claims filter - I can’t see from the Okta documentation I’ve read that I’m missing anything.

Any ideads what the issue could be please?

Just to add - if I call then you can see groups listed as scope

Hi @beeza650

The configuration screen that you posted applies to Okta authorization server (eg.

In order to use the groups claim in a custom authorization server, please navigate in your administrative panel to Security >> API (or start from API directly if using the developer interface) >> Authorization Servers >> default >> Claims and add the groups claim in order to be displayed in the id token.

Thanks @dragos …some caching issues I think but we’re there now. groups is a claim in the ID token.