title: How to add custom claims from Azure portal application settings
body: <p><strong>Background:</strong> I need to integrate azure active directory single-sign-on in my Angular 6 app. It is done well. I get a user object after calling the azure authentication service.</p>
  
  <p>I am using adal-angular4 npm package to achieve this
  <a href="https://www.npmjs.com/package/adal-angular4" rel="nofollow noreferrer">https://www.npmjs.com/package/adal-angular4</a></p>
  
  <p><strong>Problem:</strong> Now, I need to receive some additional fields in the "user" object as a response of Azure authentication. For that I studied the topic of "custom claims".</p>
  
  <p><strong>Attempts:</strong>
  I tried the docs of microsoft related to it but got no success. The following one
  <a href="https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-saml-claims-customization" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-saml-claims-customization</a></p>
  
  <p>I need to get the "samAccountName" in the user object as a response of the authentication web call. I added this in the single sign on configuration in the azure portal but still not receiving the mentioned claim.I navigated to
  Portal > Azure Active Directory(left hand side) > Enterprise Applications > test_claims_new (my application) > single sign on > Saml </p>
  
  <p>Then, following is the screen shot of my azure app settings.</p>
  
  <p><a href="https://i.stack.imgur.com/ZogWf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZogWf.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/bzYhc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bzYhc.png" alt="enter image description here"></a></p>
  
  <p>Following is my Angular code to perform the authentication</p>
  
  <pre><code>let config = {
      clientId: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',
      popUp: true,
      postLogoutRedirectUri: window.location.origin + '/',
      callback : (errorDesc, token, error, tokenType) =&gt;
      {
        if(!error){
          console.log("User: " , this.authContext._user);
        }  
      }
    };
  
    this.authContext = new adalAuthContext(config);
  </code></pre>
  
  <p>Following is the response (user object) I get through this entire code and configurations:</p>
  
  <p><a href="https://i.stack.imgur.com/dGuS2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dGuS2.png" alt="enter image description here"></a></p>
  
  <p><strong>Expected Result:</strong>
  One of the properties as mentioned in the above azure settings screenshot named <code>user.onpremisesamaccountname</code> should appear in my user object but I am not getting it.</p>