title: Identity Server4 connect/token endpoint gives 400 Bad Request
body: <p>We are using EntityFrameworkCore with Identity Server4. After initial setup, the discovery endpoint of identity server (<code>localhost:6000/.well-known/openid-configuration</code>) is working fine. When we tried to call the <code>connect/token</code> endpoint from postman it gives 400 bad request response. Here is our client:</p>
  
  <pre><code>public static IEnumerable&lt;Client&gt; GetClients()
  {
      return new List&lt;Client&gt;
      {
          new Client
          {
              ClientId = "client",
  
              // no interactive user, use the clientid/secret for authentication
              AllowedGrantTypes = GrantTypes.HybridAndClientCredentials,
  
              // secret for authentication
              ClientSecrets =
              {
                  new Secret("secret".Sha256())
              },
  
              // scopes that client has access to
              AllowedScopes = { ApiResourceName.Sup_Api.Description() }
          },
          new Client
          {
              ClientId = "client2",
  
              // no interactive user, use the clientid/secret for authentication
              AllowedGrantTypes = GrantTypes.HybridAndClientCredentials,
  
              // secret for authentication
              ClientSecrets =
              {
                  new Secret("secret".Sha256())
              },
  
              // scopes that client has access to
              AllowedScopes = { "sup"}
          }
      };
  }
  </code></pre>
  
  <p>Here is postman connect/token post request:</p>
  
  <pre><code>http://localhost:6000/connect/token
    ?client_id=client2
    &amp;client_secret=secret
    &amp;grant_type=client_credentials
    &amp;scope=sup
  </code></pre>
  
  <p>Response:</p>
  
  <pre><code>{
      "error": "invalid_request"
  }
  </code></pre>