Angular Access Token Custom Claims

I followed the Angular SPA Tutorial from the auth0 site.

In addition to that I added custom claims to the token via actions.

The custom claims are added successfully and I can see them, when I visit the “getting started → Try your Login box” on the auth0 dashboard.

The Problem is, that these Informations are not visible with the angular auth0 sdk.

I used all methods provided by the angular sdk (like getAccessTokenSilently, getIdTokenClaims, idTokenClaims$, …) but no information about the roles I added as custom claims with actions.

How can I access the roles?

EDIT: solved it, but why only the /roles claims are show with the angular sdk?

exports.onExecutePostLogin = async (event, api) => {
  const namespace = '';

  api.accessToken.setCustomClaim(`${namespace}/hello`, 'world');

  if (event.authorization) {
    api.accessToken.setCustomClaim(`${namespace}/roles`, event.authorization.roles);
    api.idToken.setCustomClaim(`${namespace}/roles`, event.authorization.roles);


I am also having the same Issue.