title: Use MSAL Auth token to consume Web API 2
body: <p>I have an ASP.Net Web API 2 on which I implemented the following security:
  <a href="https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-devquickstarts-webapi-dotnet" rel="noreferrer">https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-devquickstarts-webapi-dotnet</a></p>
  
  <p>It worked, I can't access the controllers except if I remove the [Authorize] attribute.</p>
  
  <p>Now, I have a logged in user in a Xamarin app. The user is logged in via MSAL authentication which works fine too.
  Very basic implementation :</p>
  
  <pre><code>var authenticationResult = await App.IdentityClientApp.AcquireTokenSilentAsync(App.ClientScope);
  var token = authenticationResult.Token;
  </code></pre>
  
  <p>Now, I want to access the web API by giving the MSAL authentication token in the DefaultRequestHeaders with something like this :</p>
  
  <pre><code>this.httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
  </code></pre>
  
  <p>Is there anyway this is possible ? How can I use this token to make my user consume my web API ?</p>
  
  <p>Thank you !</p>