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.
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.
- We can use a valid access token. If we go with this, client credentials (clientId & clientSecret) are optional.
- If the refresh token is provided, token will be refreshed. Here, clientId & clientSecret are mandatory for this.
- 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.
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.