This documentation applies to older versions of WSO2 ESB connectors. To find the documentation relevant to the version you are using, select the connector from the WSO2 Connector Store and click Documentation.

All docs This doc
Skip to end of metadata
Go to start of metadata

To use the EWS connector, add the  <ews.init>  element in your configuration before carrying out any other operation. 

The Exchange server API supports both basic authentication with username and password and OAuth 2.0.

Note

We have removed the basic authentication in the latest versions of the EWS connector. WSO2 EWS connector version 1.0.0 supports the basic authentication and OAuth 2.0 is supported by the versions 1.0.1 and above.

There are 3 approaches to configure the authentication via the init template in the OAuth 2.0 supported versions.

  1. We can use a valid access token. If we go with this, client credentials (clientId & clientSecret) are optional.
  2. If the refresh token is provided, token will be refreshed. Here, clientId & clientSecret are mandatory for this.
  3. If both access token and refresh token are not provided, client_credentials flow will be used to generate the access token. clientId & clientSecret are mandatory for this flow.
init with OAuth 2.0 authentication
<ews.init>
	<endpointUrl>{$ctx:ewsHost}</endpointUrl>
	<tenantId>{$ctx:tenantId}</tenantId>
    <clientId>{$ctx:clientId}</clientId>
    <clientSecret>{$ctx:clientSecret}</clientSecret>
    <accessToken>{$ctx:accessToken}</accessToken>
    <refreshToken>{$ctx:refreshToken}</refreshToken>
	<blocking>{$ctx:blocking}</blocking>
</ews.init>
init with Basic authentication
<ews.init>
	<endpointUrl>{$ctx:ewsHost}</endpointUrl>
	<username>{$ctx:username}</username>
	<password>{$ctx:password}</password>
	<blocking>{$ctx:blocking}</blocking>
</ews.init>
Properties
  • endpointUrl:The API URL of the Exchange server.
  • username: The username of the Exchange account.
  • password: The password of the Exchange account.
  • blocking: This is a boolean type property that allows the connector to perform blocking invocations to the Exchange server

Now that you have connected to the Exchange server, use the information in the following topics to perform various operations with the connector.

  • No labels