I'm using Microsoft.IdentityModel.Clients.ActiveDirectory to generate access token through AcquireTokenAsync() method.
But while using PlatformParameters, if I don't give a second argument I get this error There is no argument given that corresponds to the required formal parameter 'customWebUi' of 'PlatformParameters.PlatformParameters(PromptBehavior, ICustomWebUi)
Although there is an option of using only one argument in the documentation.
var resourceurl = Resourceurl.GetValue(dc.State);
var clientid = Clientid.GetValue(dc.State);
var redirecturl = new Uri(Redirecturl.GetValue(dc.State));
var authenticationcontext = new AuthenticationContext("https://login.microsoftonline.com/common/oauth2/authorize");
var parameters = new PlatformParameters(PromptBehavior.Auto);
var result = authenticationcontext.AcquireTokenAsync(resourceurl,clientid,redirecturl,parameters).CreateAuthorizationHeader();
This is the code snippet