Json from Active Directory, not everything in claims

Hi @mab,

Thanks for reaching out to the Auth0 Community!

I understand that you are trying to set the "user_secret_login" attribute as a custom claim to your ID Token.

Unfortunately, accessing Top-Level IdP User Attributes is not possible at this time when using Actions. This FAQ explains it in further detail.

In this situation, I recommend using Auth0 Rules to get the "user_secret_login" attribute. For example:

function(user, context, callback) {
  const namespace = 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims';

  // add custom claims to ID Token
  let idTokenClaims = context.idToken || {};
  idTokenClaims[`${namespace}/user_secret_login`] =  user.user_sercret_login;

  callback(null, user, context);
}

I hope this helps!

Please let me know how this works for you.

Thank you.

3 Likes