How can I request data from user_metadata and app_metadata?

Hello everyone,
I am trying to get the value of app_metadata and user_metadata on a user roles rule that you create:

In this way I am trying to obtain following the documentation of this link (I am working with angular 2):

CONFIGURATION:

auth0 = new auth0.WebAuth({
    clientID: 'client_id',
    domain: 'name.auth0.com',
    responseType: 'token id_token',
    audience: 'https://name.auth0.com/userinfo',
    redirectUri: 'http://localhost:4200/callback',      
    scope: 'openid profile'
  });

To get profile data use:

userProfile: any;

public getProfile(cb): void {

  const accessToken = localStorage.getItem('access_token');
  if (!accessToken) {
    throw new Error('Access token must exist to fetch profile');
  }

  const self = this;
  this.auth0.client.userInfo(accessToken, (err, profile) => {
    if (profile) {

      self.userProfile = profile;
    }
    cb(err, profile);
  });
}

But I never get the values of app_metadata and user_metadata

any solution?

Thank you

See the following documentation regarding setting custom claims in the tokens: