I am having problem in VB.Net code that connects to Mailbox using EWS. A mail account required 2F auth, 2F auth works but the problem is - EWS Oauth login expires, have to login every time application starts.
Using AcquireTokenSilentAsync, it doesn’t work
authenticationresult = authenticationContext.AcquireTokenSilentAsync(serverName, clientID).Result
AcquireTokenAsync to authenticate
authenticationresult = authenticationContext.AcquireTokenAsync(serverName, clientID, clientAppUri, oPlatformParameters).Result
A VB.Net example that solves this will be helpful.
If you already have the access token, why do you need to recreate it every time instead of reusing authenticationresult.AccessToken
?