Okta Expression Language filter for creating new claims

Hi All,

We have a requirement to add a new claim in the access token to get the scopes the user is entitled to. At the moment, we do get the default scopes in access token. Any help around how to retrieve new custom scopes and add into claims.

Appreciate any help. Thanks.

Scopes are distinct from claims: