Custom scopes/permissions not included in access token from Okta IdP

In Auth0 I have configured:

  • A Custom API with 18 permissions.
  • A Next.js client that calls the API.
  • A SPA Auth0 application with an “enterprise connection” to an Okta OIDC IdP.
  • An enterprise connection to an Okta OIDC IdP.
  • The Okta OIDC application.

Login succeeds but the token exchange does not include my custom scopes/permissions in the access token.

OIDC connection in Auth0:

Okta scopes:

This is the access token sent to the API:

  "iss": "",
  "sub": "oidc|Bookend-Okta-OIDC-SSO|00uezee7dbLsmw0kB5d7",
  "aud": [
  "iat": 1715053960,
  "exp": 1715140360,
  "scope": "openid profile email",
  "org_id": "org_pOdZ283uSzKQpddI",
  "azp": "PmuiEJVHdJVj3xaAqn4z0HCOXDhbbqyU",
  "permissions": []

I have assigned the permission to the user:

How do I get my custom scopes/permissions into the access token sent from Okta?

I see the authorize request does include the custom scopes:
1 Like

Hey @darrenk!

I see that there’s an org_id in the access token shared, are the permissions assigned directly to the user or by way of an organization? The following post explains the difference well and why you aren’t seeing any permissions in the permissions claim:

1 Like

That was the problem.
I added the role to the user at the organization level (in Auth0) and it is working now.

The scopes in the IdP (Okta) were not needed.

Thanks for your help!

1 Like

Ah, great! Thanks for confirming :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.