title: WAAD Authentication with WebAPI OData service consumed by Excel PowerQuery
body: <p>I've created a WebAPI OData 3.0 web service with an OWIN middleware, which is configured for authentication with Windows Azure Active Directory.
  The ODataControllers are marked with an <code>[Authorize]</code> attribute, and the IAppBuilder is configured as follows:</p>
  
  <pre><code>app.UseWindowsAzureActiveDirectoryBearerAuthentication(
              new WindowsAzureActiveDirectoryBearerAuthenticationOptions
              {
                  Tenant = ConfigurationManager.AppSettings["ida:Tenant"],
                  TokenValidationParameters = new TokenValidationParameters {
                      ValidAudience = ConfigurationManager.AppSettings["ida:Audience"]
                  },
              });
  </code></pre>
  
  <p><code>ida:Tenant</code> is my Windows Azure tenancy, and <code>ida:Audience</code> is the App ID Uri.</p>
  
  <p>Now I would like to consume this service using Excel PowerQuery, authenticating using an account from the AzureAD. However, when I choose "Organizational account" and try to "Sign in", I get the following error:</p>
  
  <blockquote>
    <p>Unable to connect. This credential type is not supported for this resource.</p>
  </blockquote>
  
  <p>In Fiddler I can see that the request is made with a Bearer header, but it is empty.</p>
  
  <p>I would like to achieve a behavior similar to when querying AzureAD Graph.<br/>
  For example, if I try to consume <a href="https://graph.windows.net/&lt;tenant&gt;.onmicrosoft.com/users?api-version=2013-04-05" rel="noreferrer">https://graph.windows.net/.onmicrosoft.com/users?api-version=2013-04-05</a>, a single sign-on window opens, and in Fiddler I can see that a token is passed.</p>
  
  <p>How can I achieve this behavior? what am I missing?</p>
  
  <p>Thanks!</p>