I’m trying to retrieve an instance of my outlook calendar. When I run this code:
const string domain = @"https://outlook.office365.com/owa/<my company name>.com/";
const string username = @"<my email username>";
const string password = @"<my email password>";
IEWSClient client = EWSClient.GetEWSClient(domain, username, password);
I get a 404 error when executing the GetEWSClient.
I also tried this:
const string mailboxUri = "https://outlook.office365.com/ews/exchange.asmx";
const string domain = @"https://outlook.office365.com/owa/<my company name>/";
const string username = @"<my email username>";
const string password = @"<my email password>";
NetworkCredential credentials = new NetworkCredential(username, password, domain);
IEWSClient client = EWSClient.GetEWSClient(mailboxUri, credentials);
but I get a 404 error on this as well.
Any ideas what I dont have set up properly?
Thank you.