title: Roles - Identity Server 4
body: <p>I have a project done with Asp.Net Core 2.0 API, Identity Server and WPF app. 
  I am able to access the API from WPF after I login in. </p>
  
  <p>Now I am trying to implement roles so I can be able to authorize just certain users to access the API. </p>
  
  <p>In Config.cs I am declaring my Client and add to the scope :</p>
  
  <pre><code>  new Client
              {
               AllowedScopes =
                  {
                      IdentityServerConstants.StandardScopes.OpenId,
                      IdentityServerConstants.StandardScopes.Profile,
                      IdentityServerConstants.StandardScopes.Email,
                      IdentityServerConstants.StandardScopes.OfflineAccess,
                      "fiver_auth_api",
                      "role"
                  },
              AlwaysIncludeUserClaimsInIdToken=true
             }
  </code></pre>
  
  <p>Declaring TestUser: </p>
  
  <pre><code>  return new List&lt;TestUser&gt;
          {
              new TestUser
              {
                  SubjectId = "", Username = "", Password = "",
                  Claims = new List&lt;Claim&gt;
                  {
                      new Claim(JwtClaimTypes.Email, "AliceSmith@email.com"),
                      new Claim(JwtClaimTypes.EmailVerified, "true", ClaimValueTypes.Boolean),
                      new Claim(JwtClaimTypes.Role, "Admin"),
                      new Claim(JwtClaimTypes.Scope, "openid offline_access fiver_auth_api")
                  }
              }
         }   
  </code></pre>
  
  <p>And in the controller I am using :</p>
  
  <pre><code>[Authorize(Roles = "Admin")]
  </code></pre>
  
  <p>Why I don`t get the user claims in the token?</p>