I'm trying to use the ExchangeService.AutodiscoverUrl() method, but it's not working. It doesn't seem to be getting a URL, resulting in the error "Cannot read property 'AbsoluteUri' of undefined" from ExchangeCredentials.GetUriWithoutSuffix.
Here is my code ('c' is just a json object):
service = new EwsJS.ExchangeService(EwsJS.ExchangeVersion.Exchange2016);
service.Credentials = new EwsJS.ExchangeCredentials(c.UserName, c.Password);
service.AutodiscoverUrl("[email protected]", RedirectCallback);
// I'm forcing the accepted redirect here.
function RedirectCallback(url) {
return true;
}
Autodiscover inews-javascript-apineeds major re-write to work properly.Autodiscover is re-written, latest dev build is out with
@nexttag. you can now use it when installingnpm i ews-javascript-api@next, once stable build is out you can install regular build.