Hi @Anonymous,
Sorry for the delayed response. Here is the reply from pg:
Can you tell me a little more about how the ASP.NET site does authentication? Is this by user, (so each user is registered in AAD), or is there one user that does the authentication?
There is a flag that determines whether the prompt occurs:
var settings = new ConnectionSettings()
{
Credentials = new UserCredentialsSettings()
{
UserName = "Name@microsoft.com",
ApplicationId = "…",
UserSource = UserSource.LoggedIn,
//RedirectUri = "http://localhost",
},
EnvironmentId = "…",
Tenant = "Microsoft.com",
};
using (var client = await settings.CreateClient())
{
Task.Run(() => DoItAsync(client));
Console.WriteLine("Press any key...");
Console.ReadLine();
}
The behavior you describe for the async is correct. The await would cause the control to transfer back to the calling method, but as soon as the client is created, the control would continue after the await.
Regards,
Mona