title: How to get user profile details using Azure AD
body: <p>I am using react-aad-masl module to integrate Microsoft SSO in my react application. I am able to redirect my user to Microsoft login page and after that its coming back to my page with token. After that its only returning <code>accountInfo</code> that contain User name and email ID. I have a requirement to get user other details as well like ID, first name, last name, Group, etc.</p>
  <p>These all details will come through this Azure AD MASL or i need to do Graph API call?</p>
  <p>Below is my implementation</p>
  <p>//authProvider.js</p>
  <pre><code>import { MsalAuthProvider, LoginType } from 'react-aad-msal';
  import { Logger, LogLevel } from &quot;msal&quot;;
  
  // Msal Configurations
  const config = {
    auth: {
      authority: 'https://login.microsoftonline.com/*********',
      clientId: '*************',
      redirectUri: 'http://localhost:3000/'
    },
    // Enable logging of MSAL events for easier troubleshooting.
    // This should be disabled in production builds.
    system: {
      logger: new Logger(
        (logLevel, message, containsPii) =&gt; {
          console.log(&quot;[MSAL]&quot;, message);
        },
        {
          level: LogLevel.Verbose,
          piiLoggingEnabled: false
        }
      )
    },
    cache: {
      cacheLocation: &quot;sessionStorage&quot;,
      storeAuthStateInCookie: true
    }
  };
   
  // Authentication Parameters
  const authenticationParameters = {
    scopes: [
      'user.read',
      'profile',
      'openid'
      //'profile.read', 
      // 'User.Read.All',
      // 'Group.Read.All',
      // 'User.ReadBasic.All',
      // 'Group.Read'
    ]
  }
   
  // Options
  const options = {
    loginType: LoginType.Redirect,
    tokenRefreshUri: window.location.origin + '/auth.html'
  }
   
  export const authProvider = new MsalAuthProvider(config, authenticationParameters, options)
  </code></pre>
  <p>//APP.js</p>
  <pre><code>&lt;AzureAD provider={authProvider}  forceLogin={false}&gt;
        {(abc) =&gt; {
            console.log('&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;...', abc);
            
            props.setAccountInfo(abc.accountInfo.account);
            return &lt;AppRouter /&gt;
        }}
        &lt;/AzureAD&gt;
  </code></pre>
  <p>Here in abc i am getting below information</p>
  <p><a href="https://i.stack.imgur.com/jDRBn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jDRBn.png" alt="enter image description here" /></a></p>
  <p>Please help me in this</p>