Trying to create a rule for getting scope permissions from an external API

Hi @mathieu1er,

Welcome to the Community!

You won’t be able to add them directly to the scopes in the token.

Instead you can make the call, receive the permissions, and add them as a custom claim.

Here is a rule describing how to make a call to an external API:

And here is a doc describing how to add custom claims to a token:

https://auth0.com/docs/scopes/current/sample-use-cases#add-custom-claims-to-a-token

Hope this helps!