Accessing roles and authorities inside resource server

I am using Okta as my Authorization server and have configured the groups. Below is the output of my jwt token

  "ver": 1,
  "jti": "AT.MLATzoDXQohRjfDJ1tooFQAxolmncR1PputIxk4tm2c",
  "iss": "",
  "aud": "api://default",
  "iat": 1633006480,
  "exp": 1633010080,
  "cid": "0oa3mz4mtisXjRJf85d6",
  "uid": "00u3myy5sOl9SDbv35d6",
  "scp": [
  "sub": "",
  "groups": [

The groups is a custom claim that I have configured in my Auth server.

I am using a Spring boot application as my resource server. I am not aware of how to use the groups claims and map it to authorities so that I can add the authorization checks in my resource server.

Looks like you will have to add custom code to map the groups claim to Spring security authorities.

Alternatively, the okta-spring-boot-starter will do this for you.