Zum Hauptinhalt springen

EwsServiceFactory

factory class to create an ews service object.

context.enableModules();

const { EwsServiceFactory } = require("ou.sp.ews.EwsServiceFactory");
const ewsService = EwsServiceFactory.getInstance("tenantId", "clientId", "secret");

Deprecated​

Microsoft is retiring EWS in Exchange Online, this API is no longer supported.

See​

https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/deprecation-of-ews-exchange-online

Constructors​

Constructor​

new EwsServiceFactory(): EwsServiceFactory

Returns​

EwsServiceFactory

Methods​

getInstance()​

static getInstance(tenantId?, clientId?, secret?): Service

Returns a new or existing instance of ews.Service by given tenantId, clientId, secret. If no arguments are passed, the information will be loaded from the current principal by following attributes: $ExchangeOnlineTenant $ExchangeOnlineClientId $ExchangeOnlineClientSecret.

Parameters​

tenantId?​

string

the given tenant

clientId?​

string

the given client

secret?​

string

the secret token

Returns​

Service

a new or existing instance of ews.Service