title: .Net Core 2.0 - OpenID Connect - invalid Discovery Document
body: <p>i'm using a specific OIDC provider for my security in .Net Core 2.0 MVC Project, however I am having trouble with the Discovery Document.</p>
  
  <p>I have been given 3 url's from the provider (where the domain is fiction):</p>
  
  <blockquote>
    <p><a href="https://www.oidcprovider.com/connectapi/authorize" rel="nofollow noreferrer">https://www.oidcprovider.com/connectapi/authorize</a></p>
    
    <p><a href="https://www.oidcprovider.com/connectapi/token" rel="nofollow noreferrer">https://www.oidcprovider.com/connectapi/token</a></p>
    
    <p><a href="https://www.oidcprovider.com/connectapi/userinfo" rel="nofollow noreferrer">https://www.oidcprovider.com/connectapi/userinfo</a></p>
  </blockquote>
  
  <p>in my configuration, i have entered the following values:</p>
  
  <pre><code> .AddOpenIdConnect(options =&gt; {
                      options.Authority = "https://www.oidcprovider.com/connectapi/authorize/";
                      options.ClientId = "xxx";
                      options.ClientSecret = "xxx";
                      options.ResponseType = OpenIdConnectResponseType.Code;
                      options.CallbackPath = new PathString("/api/security/callback");
  </code></pre>
  
  <p>I am getting the following error, trying to run the application:</p>
  
  <blockquote>
    <p>An unhandled exception occurred while processing the request.
    HttpRequestException: Response status code does not indicate success: 400 (Bad Request).
    System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()</p>
    
    <p>IOException: IDX10804: Unable to retrieve document from:
    '<a href="https://www.oidcprovider.com/connectapi/authorize/.well-known/openid-configuration" rel="nofollow noreferrer">https://www.oidcprovider.com/connectapi/authorize/.well-known/openid-configuration</a>'.
    Microsoft.IdentityModel.Protocols.HttpDocumentRetriever+d__8.MoveNext()</p>
    
    <p>InvalidOperationException: IDX10803: Unable to obtain configuration
    from:
    '<a href="https://www.oidcprovider.com/connectapi/authorize/.well-known/openid-configuration" rel="nofollow noreferrer">https://www.oidcprovider.com/connectapi/authorize/.well-known/openid-configuration</a>'.
    Microsoft.IdentityModel.Protocols.ConfigurationManager+d__24.MoveNext()</p>
  </blockquote>
  
  <p><strong>Is the OIDC Discovery Document required for this to work?</strong></p>
  
  <p>I have tried calling the discovery document URL directly in my browser, by calling this url: <a href="https://www.oidcprovider.com/connectapi/authorize/.well-known/openid-configuration" rel="nofollow noreferrer">https://www.oidcprovider.com/connectapi/authorize/.well-known/openid-configuration</a></p>
  
  <p>However, I receive this JSON information back:</p>
  
  <blockquote>
    <p>{"error":"invalid_client","error_description":"No client id supplied"}</p>
  </blockquote>
  
  <p>How do I get this to work?</p>
  
  <p><strong>My 2 Questions are:</strong></p>
  
  <p><strong>1. Is the Discovery Document Optional or Mandatory ?</strong></p>
  
  <p><strong>2. Can I specify the endpoints manually in .net Core 2.0 when no disco doc is available?</strong></p>