In the older versions of Microsoft.IdentityModel.Clients.ActiveDirectory there is AcquireToken with PromptBehavior parameter
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);
In Microsoft.IdentityModel.Clients.ActiveDirectory v3.10 there is only AcquireTokenAsync
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();
When I run this I get error {"Invalid owner window type. Expected types are IWin32Window or IntPtr (for window handle)."}
Not sure if this is due to I am running on a console application. If so how do i get it to work?