-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
Hello!
I am trying to initialize calender folder object using ews.CalendarFolder.Bind(exch, ews.WellKnownFolderName.Calendar) but I get this error
TypeError: Cannot read properties of undefined (reading 'headers')
at NtlmProvider.preCall (D:\TDRA\tra-gate-api\node_modules\@ewsjs\xhr\dist\ntlmProvider.js:48:27)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async XhrApi.xhr (D:\TDRA\tra-gate-api\node_modules\@ewsjs\xhr\dist\xhrApi.js:123:25
Here is the code
// create instance
let xhr = new XhrApi({rejectUnauthorized: false})
.useNtlmAuthentication(credentials.userName, credentials.password);
ews.ConfigurationApi.ConfigureXHR(xhr);
var service = new ews.ExchangeService(ews.ExchangeVersion.Exchange2013);
service.Credentials = new ews.WebCredentials(credentials.userName, credentials.password);
service.Url = new ews.Uri(this.app.options['exchangeServiceUrl']);
service.ImpersonatedUserId = new ews.ImpersonatedUserId(ews.ConnectingIdType.SmtpAddress, email)
// Initialize the calendar folder object with only the folder ID.
let calendar = await ews.CalendarFolder.Bind(service, ews.WellKnownFolderName.Calendar);
...
This issue occurs with ews.CalendarFolder.Bind(service, ews.WellKnownFolderName.Calendar);
PS: I tried to figure out what is the issue from the package I found that this request returns undefined
Metadata
Metadata
Assignees
Labels
No labels