title: Identity server retrieving user details
body: <p>I have been trying to implement identity server with my angular application by following <a href="https://www.scottbrady91.com/Angular/SPA-Authentiction-using-OpenID-Connect-Angular-CLI-and-oidc-client" rel="nofollow noreferrer">this tutorial</a>. I've found it really helpful so far.</p>
  
  <p>I would like to get the users name plus a few custom details, but I cannot work out how to do it.</p>
  
  <p>In the section</p>
  
  <pre><code>export function getClientSettings(): UserManagerSettings {
      return {
          authority: 'http://localhost:5555/',
          client_id: 'angular_spa',
          redirect_uri: 'http://localhost:4200/auth-callback',
          post_logout_redirect_uri: 'http://localhost:4200/',
          response_type:"id_token token",
          scope:"openid profile api1",
          filterProtocolClaims: true,
          loadUserInfo: true
      };
  }
  </code></pre>
  
  <p>I have made sure I have set <code>loadUserInfo: true</code>. But when I look at the contents of the returned object I can't see any user information.</p>
  
  <p><a href="https://i.stack.imgur.com/kHwwc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kHwwc.png" alt="oicd object"></a></p>
  
  <p>Do I need to do something on the server to return user firstname etc. I am currently using the TestUser class, but I expected to see Username in user.profile on the client. On the server my user is set up as</p>
  
  <pre><code>new TestUser {
      SubjectId = "5BE86359-073C-434B-AD2D-A3932222DABE",
      Username = "scott",
      Password = "password"
  }
  </code></pre>
  
  <p>and as shown above I can see the <code>SubjectId</code> (although I find it odd that it is mapped to sub and not sid)</p>
  
  <p>The way I understood the tutorial was that once logged successfully oicd-client would make another call to the server using the retrieved token, to get the users details when you set <code>loadUserInfo: true</code></p>
  
  <p>Why can't I see the details?</p>
  
  <p>EDIT:</p>
  
  <p>Looking through the tutorial again, I noticed this line:</p>
  
  <blockquote>
    <p>If loadUserInfo is set to true, it will also call the user info endpoint to get any extra identity data it has been authorized to access.</p>
  </blockquote>
  
  <p>How do I authorize the user info endpoint  to get access to data I want it to access?</p>