Microsoft Exchange Web Services (EWS) 2.0.0
App Vendor: Microsoft
App Category: Messaging
Connector Version: 2.1.2
API Version: 1.0.0
Important
Before upgrading a Orchestrate instance to the 3.2.1.0 version, you must upgrade this app to the latest version (v2.0.0) and validate the functioning of the associated Playbooks.
About App
This app provides integration with Exchange Web Services (EWS) API. The Exchange Web Services API allows to access Microsoft Exchange items such as calendars, contacts and email via API.
The Microsoft Exchange Web Services (EWS) app is configured with the Orchestrate application to perform the following actions:
Action Name | Description |
---|---|
Delete Email Mailbox | This action deletes recent emails from a folder in the Microsoft EWS application. |
Get Emails by Filters | This action retrieves emails using filters from the Microsoft EWS application. |
Get Folders From Mailbox | This action retrieves the folders from the Microsoft EWS application. |
Get Recent Emails | This action retrieves recent emails from a folder in the Microsoft EWS application. |
Send Email | This action sends an email. |
Configuration Parameters
The following configuration parameters are required for the Microsoft Exchange Web Services (EWS) app to communicate with the Microsoft Exchange Web Services (EWS) enterprise application. The parameters can be configured by creating instances in the app.
Parameter | Description | Field Type | Required/Optional | Comments |
---|---|---|---|---|
User Email | Enter the email address of the user. Example: john.doe@org.com | Text | Required | |
Client ID | Enter the Azure AD app client ID. This is required for OAuth 2.0 authentication. Example: 09cd25c9-29b3-99ff-b49z-41235465b427 | Text | Optional | |
Tenant ID | Enter the Azure AD app tenantID. This is required for OAuth 2.0 authentication. Example: 09cd25c9-29b3-99ff-b49z-41235465b427 | Text | Optional | |
Client Secret | Enter the Azure AD app client secret. This is required for OAuth 2.0 authentication. Example: 12345~123245123245abc~abc1234512345abc | Password | Optional | |
Autodiscover | Choose whether to enable Autodiscover or not. | Boolean | Optional | For more information about Autodiscover, see Autodiscover. Default value: false Allowed values:
|
Mail Server | Enter the Exchange server domain name. | Text | Required | |
Username | Enter username required for basic authentication. Example: johndoe | Text | Optional | |
Password | Enter the password required for basic authentication. | Password | Optional | |
Use OAuth | Choose to enable OAuth 2.0 authentication. For OAuth 2.0 auth, the client_id, tenant_id and client_secret are required. For basic auth, username and password are required. | Boolean | Optional | Default value: true Allowed values:
|
For more information on retrieving the configuration parameters and assigning the Microsoft Graph and API permissions, see Register Applications and Assign Permissions for EWS Exchange and Office 365 apps.
Action: Delete Email Mailbox
This action can be used for to specific type of delete recent email's from a particular folder from The Exchange Web Services (EWS) Application
Action Input Parameters
Parameter | Description | Field Type | Required/Optional | Comments |
---|---|---|---|---|
Folder Name | Enter the folder name. Example: inbox | Text | Required | You can retrieve the folder name using the Get Folders from Mailbox action. |
Delete Type | Enter the delete type. Example: trash | Text | Optional | Allowed values:
Default value: soft |
Number of Emails | Enter the number of recent emails to be deleted. Example: 5 | Integer | Optional | Default value: 1 |
Example Request
[ { "folder_name": "inbox", "delete_type": "trash", "count": 5 } ]
Action: Get Emails by Filters
This action can be used for get emails by filters from The Exchange Web Services (EWS) Application.
Action Input Parameters
Parameter | Description | Field Type | Required/Optional | Comments |
---|---|---|---|---|
Folder Name | Enter the folder name to retrieve emails. Example: inbox | Text | Optional | Default value: inbox You can retrieve the folder name using the Get Folders from Mailbox action. |
Email Subject | Enter the email subject. Example: Malware attack | Text | Optional | Default value: None |
Input Sender Email Address | Enter the email address of the sender. Example: johndoe@org.com | Text | Optional | Default value: None |
Count of Emails | Enter the number of emails to be retrieved. Example: 5 | Integer | Optional | Default value: 1 |
Parse All Attachments | Choose to parse attachments of file types besides email, text, and JSON. Example: true | Boolean | Optional | Allowed values:
Default value: true |
Return Email Body as Plaintext | Choose to return the email body as plain text, instead of HTML. Example: true | Boolean | Optional | Allowed values:
Default value: false |
Example Request
[ { "folder_name": "inbox", "email_subject": "Malware attack", "sender_email_address": "johndoe@org.com", "count": 5, "get_body_in_text": true, "parse_attachments": true } ]
Action: Get Folders from Mailbox
This action can be used to retrieve folders inside of "root/Top of Information Store" folders up to depth one from The Exchange Web Services (EWS) Application.
Action Input Parameters
This action does not require any input parameter.
Action: Get Recent Emails
This action can be used for retrieves received emails for a given folder in The Exchange Web Services (EWS) Application.
Action Input Parameters
Parameter | Description | Field Type | Required/Optional | Comments |
---|---|---|---|---|
Folder Name | Enter the folder name. Example: inbox | Text | Optional | Default value: inbox You can retrieve the folder name using the Get Folders rom Mailbox action. |
Count of Emails | Enter the number of recent emails to be retrieved. Example: 5 | Integer | Optional | Default value: 1 |
Sub Folder Name | Enter the sub-folder name. Example: Calendar | Text | Optional | Default value: None You can retrieve the sub-folder name using the Get Folders from Mailbox action. |
Unread Emails | Choose to retrieve only the unread emails. Example: true | Boolean | Optional | Allowed values:
Default value: true |
Parse All Attachments | Choose to parse all attachments included in emails. Example: true | Boolean | Optional | Allowed values:
Default value: true |
Read Order | Enter the reading order (oldest to newest or newest to oldest) to retrieve emails. Example: true | Boolean | Optional | Allowed values:
Default value: true |
Return Email Body as Plaintext | Choose to return the email body as plain text, instead of HTML. Example: true | Boolean | Optional | Allowed values:
Default value: false |
Example Request
[ { "folder_name": "inbox", "count": 5, "sub_folder": "Inbox-2", "only_unread_emails": true, "parse_attachments": true, "older_email_first": false, "get_body_in_text": true } ]
Action: Send Email
This action sends an email.
Action Input Parameters
Parameter | Description | Field Type | Required/Optional | Comments |
---|---|---|---|---|
Recipients ID | Enter comma-separated email IDs of the recipients. Example: johndoe@org.com, ericdoe@org.com | Text | Required | |
Subject | Enter the email subject. Example: Malware Attack | Text | Required | |
Message Body | Enter the email message body. Example: Attack detected | Text | Required | |
CC Recipients ID | Enter comma-separated email IDs of the recipients to be added in CC. Example: rickdoe@org.com, phildoe@org.com | Text | Optional | |
BCC Recipients ID | Enter comma-separated email IDs of the recipients to be added in BCC. Example: lewis@org.com, fredrick@org.com | Text | Optional | |
Attachments | Enter the list of local file paths for attachments. Example: $LIST[tmp/path/file.txt, /tmp/path/file2.txt] | List | Optional |
Example Request
[ { "recipients_id": "johndoe@org.com, ericdoe@org.com", "email_subject": "Malware Attack", "email_body": "Attack detected", "cc_recipients": "lewis@org.com, phildoe@org.com", "bcc_recipients": "sampleuser5@example.com, sampleuser6@example.com", "attachments": ["/tmp/path/file.txt", "/tmp/path/file2.txt"] } ]