title: Azure OAuth2 Client Credential flow - getting token for multiple scopes throws error
body: <p>When using the MSAL library to generate access token for a background console application, using client_credentials, to call two REST endpoints, the get token call is created as:</p>
  
  <pre><code>client_id=XXX&amp;client_info=1&amp;client_secret=XXXX&amp;scope=api%3A%2F%2FMyService-DevBlr-ClientServices%2F.default+api%3A%2F%2FMyService-DevBlr-CoreServices%2F.default&amp;grant_type=client_credentials
  </code></pre>
  
  <p>and posted to </p>
  
  <pre><code>https://login.microsoftonline.com/a1326aec-378e-4433-8e2a-67a086554fc8/oauth2/v2.0/token
  </code></pre>
  
  <p>The response is a 400 error:</p>
  
  <pre><code>{"error":"invalid_scope","error_description":"AADSTS70011: The provided request must include a 'scope' input parameter. The provided value for the input parameter 'scope' is not valid. The scope api://MyService-DevBlr-ClientServices/.default api://MyService-DevBlr-CoreServices/.default is not valid.\r\nTrace ID: 203ad632-5e7c-4e61-9dcd-185eb9b49200\r\nCorrelation ID: 99fd979a-2c11-485b-ba14-c0cad3312e02\r\nTimestamp: 2020-01-11 08:36:29Z","error_codes":[70011],"timestamp":"2020-01-11 08:36:29Z","trace_id":"203ad632-5e7c-4e61-9dcd-185eb9b49200","correlation_id":"99fd979a-2c11-485b-ba14-c0cad3312e02"}
  </code></pre>
  
  <p>When individual scopes are passed in, the call works ok:</p>
  
  <pre><code>Request:
  client_id=XXXX&amp;client_info=1&amp;client_secret=XXXX&amp;scope=api%3A%2F%2FMyService-DevBlr-CoreServices%2F.default&amp;grant_type=client_credentials 
  
  Response:
  {"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"eyJ0e..."}
  </code></pre>
  
  <p>and </p>
  
  <pre><code>Request: 
  client_id=XXXX&amp;client_info=1&amp;client_secret=XXXX&amp;scope=api%3A%2F%2FMyService-DevBlr-ClientServices%2F.default&amp;grant_type=client_credentials
  
  Response:
  {"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"eyJ0eX..."}
  </code></pre>
  
  <p>The documentation and the API supports scopes array:
  <a href="https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/Client-credential-flows#code-snippet" rel="nofollow noreferrer">https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/Client-credential-flows#code-snippet</a></p>
  
  <p>There is benefit in getting a single token to be used with multiple service calls, but I can't seem to get this working. Any suggestion is appreciated.</p>