title: How to set multiple audiences in Asp.Net Core 2.0 "AddJwtBearer" middleware?
body: <p>I have an Asp.Net Core 2.0 WebApi which is authenticating against AAD:</p>
  
  <pre><code>            services.AddAuthentication(options =&gt; { options.DefaultScheme = JwtBearerDefaults.AuthenticationScheme; })
                  .AddJwtBearer(options =&gt;
                              {
                                  options.Authority = "https://login.microsoftonline.com/TENANT.onmicrosoft.com";
                                  options.Audience = "CLIENT_ID";
                              });
  </code></pre>
  
  <p>My SPA app gets the token from AAD and sent it as <code>bearer</code> header. All works fine.</p>
  
  <p>I have create a Job in Azure Scheduler and setup <code>Active Directory OAuth</code>:
  <a href="https://i.stack.imgur.com/gV4vI.png" rel="noreferrer"><img src="https://i.stack.imgur.com/gV4vI.png" alt="Job - Active Directory OAuth"></a></p>
  
  <p>After running a job I get this error: <code>Bearer error="invalid_token", error_description="The audience is invalid"</code>.</p>
  
  <p>When I set <code>options.Audience</code> in <code>AddJwtBearer(...)</code> to <code>https://management.core.windows.net/</code> the Job works but not the SPA.</p>
  
  <p>I guess, I need to set <code>Audience</code> to an array <code>['CLIENT_ID', "https://management.core.windows.net/"]</code> but the <code>options.Audience</code> is type of <code>string</code>. If I don't set <code>Audience</code> at all, both Spa and Job does not work (401 unauthenticated). Setting <code>Audience</code> to <code>CLIENT_ID,https://management.core.windows.net/</code> does not work either.</p>
  
  <p>Is there a way how to enable multiple audiences in <code>AddJwtBearer</code>?</p>