title: How to AcquireToken with PromptBehavior in the latest Microsoft.IdentityModel.Clients.ActiveDirectory
body: <p>In the older versions of Microsoft.IdentityModel.Clients.ActiveDirectory there is AcquireToken with PromptBehavior parameter</p>
  
  <pre><code>var context = new AuthenticationContext("https://login.windows.net/tenantId");
  var result = context.AcquireToken(clientId: clientIdValue, redirectUri: new Uri("http://localhost/Appcycle"), resource: "https://management.core.windows.net/", promptBehavior: PromptBehavior.Auto);
  </code></pre>
  
  <p>In Microsoft.IdentityModel.Clients.ActiveDirectory v3.10 there is only AcquireTokenAsync </p>
  
  <pre><code>var authParam = new PlatformParameters(PromptBehavior.Auto,false);
  var result = context.AcquireTokenAsync("https://management.core.windows.net/", clientid, new Uri("http://localhost/AppPoolRecycle"), authParam);
  result.Wait();
  </code></pre>
  
  <p>When I run this I get error
  <strong>{"Invalid owner window type. Expected types are IWin32Window or IntPtr (for window handle)."}</strong></p>
  
  <p>Not sure if this is due to I am running on a console application. If so how do i get it to work?</p>