Read custom claims/scope from access token in actions

We are evaluating the migrations of rules to actions.

I could see examples about how to set the custom claims to an access token in actions. But how do we read the claims from access token in actions? Atleast as far as i could see, only api.accessToken has setCustomClaims method. Is there any other way to achieve this?

Also we are reading and altering access token scopes in our rules. It seems, it is a limitation in actions. Do we have any alternative to achieve this?.


Hi @mathiarul.g

Welcome to the Auth0 Community!

Thanks for posting your question, can I clarify it? You are asking if it’s possible to read claims from the access token before adding a new one/modifying existing ones. Am I right?



Hi @dawid.matuszczyk , Thanks for the reply.

Yes, exactly. We do that in our existing rules. We read a particular claim, check if there are any existing value, do some validations and append some values and so on…

Any answer to this question? I’m running into the same problem. I cannot figure out how to read claims in an action.

@dawid.matuszczyk @mathiarul.g - was there ever a resolution/answer to this issue/question? We’d like to do the same thing.

Hey there!

As this topic is related to Actions and Rules & Hooks are being deprecated soon in favor of Actions, I’m excited to let you know about our next Ask me Anything session in the Forum on Thursday, January 18 with the Rules, Hooks and Actions team on Rules & Hooks and why Actions matter! Submit your questions in the thread above and our esteemed product experts will provide written answers on January 18. Find out more about Rules & Hooks and why Actions matter! Can’t wait to see you there!

Learn more here!

Any answer on this? We are working on migrating our rules to actions and will need to be able to read claims from access token. Is this possible?