title: IdentityServer3 Multi Tenant IdSvr (single instance) with Multi Tenant Api (single instance) - needed multiple authserver addresses
body: <p>We have IdSvr single instance with Web Api single instance that both support multi tenant. Our web app is deployed to multiple domains with their own styling on each. The business does not want them to be redirected to the IdSvr such as <a href="http://multiauth.identityserver.com" rel="nofollow noreferrer">http://multiauth.identityserver.com</a>. They want to go from a website domain to the IdSvr using <a href="http://auth.websitedomain1.com" rel="nofollow noreferrer">http://auth.websitedomain1.com</a> and another would use <a href="http://auth.websitedomain2.com" rel="nofollow noreferrer">http://auth.websitedomain2.com</a>, etc</p>
  
  <p>The issue is with the Web Api and setting up the Bearer authentication.</p>
  
  <pre><code>app.UseIdentityServerBearerTokenAuthentication(new IdentityServerBearerTokenAuthenticationOptions
          {
              Authority = Constants.BaseAddress,
              RequiredScopes = new[] { "cspwebapi" },
  
              // client credentials for the introspection endpoint
              ClientId = "cspclient",
              ClientSecret = "8BE96BA5-79F1-4FA4-8E41-6BCE7EA7090F",
          });
  </code></pre>
  
  <p>I can only specify <a href="http://multiauth.identityserver.com" rel="nofollow noreferrer">http://multiauth.identityserver.com</a> as the Authority and not multiple such as <a href="http://auth.websitedomain1.com" rel="nofollow noreferrer">http://auth.websitedomain1.com</a> and <a href="http://auth.websitedomain2.com" rel="nofollow noreferrer">http://auth.websitedomain2.com</a>. The client gets a 401.</p>
  
  <p>So far I have the single instance IdSvr with bindings auth.websitedomain1.com, auth.websitedomain2.com, auth.websitedomain3.com.  Now on the Web Api (resource server) I iterate through the array of domain names and create a new app.Map(....) with each domain for the Authority property.  The resource server spins up without issue meaning it can see the IdSvr at each domain name.  The app.Map(....) segment needs to be the same for all of them...I now have found that doing app.Map('') for all of them will not work for the second or third domain name.  Am I on to something here or is this the wrong approach?  How else can I configure this to work per the requirements?</p>