I'm new too c#. I'm trying to update the exchange connection code to use OAuth 2.0 instead of basic authentication.
this is my existing code I have to convert:
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1);
service.Url = new Uri(https://outlook.office365.com/EWS/Exchange.asmx);
service.Credentials = new NetworkCredential("USER", "PASSWORD");
service.HttpHeaders.Add("X-AnchorMailbox", "USER);
service.AutodiscoverUrl(emailProcesses.AccountName, RedirectionUrlValidationCallback);
I have registered the app in azure ad. How to proceed? Should I proceed with Graph API or EWS managed Api?