|
| 1 | +--- |
| 2 | +title: Microsoft EWS (Graph) |
| 3 | +description: '' |
| 4 | +--- |
| 5 | + |
| 6 | +import useBaseUrl from '@docusaurus/useBaseUrl'; |
| 7 | + |
| 8 | +<img src={useBaseUrl('/img/platform-services/automation-service/app-central/logos/microsoft-ews.png')} alt="microsoft-ews" width="100"/> |
| 9 | + |
| 10 | +***Version: 1.0 |
| 11 | +Updated: Sep 10, 2025*** |
| 12 | + |
| 13 | +Perform actions on Microsoft EWS mailboxes and accounts using Graph API. |
| 14 | + |
| 15 | +## Actions |
| 16 | + |
| 17 | +* **Get Attachments** (*Enrichment*) - Get an email attachment. |
| 18 | +* **Get Contacts** (*Enrichment*) - Get all contacts for a mailbox. |
| 19 | +* **Get Searchable Mailboxes** (*Enrichment*) - Multiple new fields to search mails. |
| 20 | +* **Get Out Of Office** (*Enrichment*) - Get out of office message for a mailbox. |
| 21 | +* **Search Emails Extended** (*Enrichment*) - Search emails with multiple new fields to search mails. |
| 22 | +* **Copy Email** (*Containment*) - Copy email to a new destination. |
| 23 | +* **Delete Attachments** (*Containment*) - Delete an attachment. |
| 24 | +* **Delete Email** (*Containment*) - Delete an email. |
| 25 | +* **Download Mail As EML** (*Enrichment*) - Save the whole email as EML format in incident attachments / objects. |
| 26 | +* **Forward Mail** *(Containment)* - Forward the email. |
| 27 | +* **Send Email** *(Notification)* - Send an email. |
| 28 | +* **Reply To Email** *(Notification)* - Reply to an email with a given item ID. |
| 29 | + |
| 30 | +## Microsoft EWS configuration |
| 31 | + |
| 32 | +Each application for which you want the Microsoft identity platform to perform identity and access management (IAM) needs to be registered. Registering it establishes a trust relationship between your application and the identity provider, the Microsoft identity platform. |
| 33 | + |
| 34 | +### Register an application |
| 35 | + |
| 36 | +[Registering your application](https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-authenticate-an-ews-application-by-using-oauth) establishes a trust relationship between your app and the Microsoft identity platform. The trust is unidirectional. Your app trusts the Microsoft identity platform, and not the other way around. |
| 37 | + |
| 38 | +Follow these steps to create the app registration: |
| 39 | + |
| 40 | +1. Sign in to the [Azure portal](https://portal.azure.com/). |
| 41 | +2. If you have access to multiple tenants, use the Directory + subscription filter <br/>Click <img src={useBaseUrl('/img/platform-services/automation-service/app-central/integrations/microsoft-ews/microsoft-ews-1.png')} style={{border:'1px solid gray'}} alt="/microsoft-ews" width="30"/> in the top menu to select the tenant in which you want to register an application. |
| 42 | +3. Search for and select the **Azure Active Directory**. |
| 43 | +4. Under **Manage**, select **App registrations > New registration**. |
| 44 | +5. Enter a **Name** for your application. Users of your app might see this name, and you can change it later. |
| 45 | +6. Select **Register** to complete the initial app registration. |
| 46 | +7. Don't enter anything for **Redirect URI (optional)**.<br/><img src={useBaseUrl('/img/platform-services/automation-service/app-central/integrations/microsoft-ews/microsoft-ews-2.png')} style={{border:'1px solid gray'}} alt="/microsoft-ews" width="800"/> |
| 47 | + |
| 48 | +When registration completes, the Azure portal displays the app registration's **Overview** pane, which includes its Application (client) ID. Also referred to as just client ID, this value uniquely identifies your application in the Microsoft identity platform. |
| 49 | + |
| 50 | +The client ID as one aspect in validating the security tokens it receives from the identity platform.<br/><img src={useBaseUrl('/img/platform-services/automation-service/app-central/integrations/microsoft-ews/microsoft-ews-3.png')} style={{border:'1px solid gray'}} alt="/microsoft-ews" width="800"/> |
| 51 | + |
| 52 | +### Add credentials |
| 53 | + |
| 54 | +Credentials are used by confidential client applications that access an API. Examples of confidential clients are web apps, or service- and daemon-type applications. Credentials allow your application to authenticate as itself, requiring no interaction from a user at runtime. |
| 55 | + |
| 56 | +You can add client secrets (a string) as credentials to your confidential client app registration. |
| 57 | + |
| 58 | +<br/><img src={useBaseUrl('/img/platform-services/automation-service/app-central/integrations/microsoft-ews/microsoft-ews-4.png')} style={{border:'1px solid gray'}} alt="/microsoft-ews" width="800"/> |
| 59 | + |
| 60 | +### Add a client secret |
| 61 | + |
| 62 | +The client secret, known also as an application password, is a string value of your app. |
| 63 | + |
| 64 | +1. Select your application in App registrations in the Azure portal. |
| 65 | +2. Select **Certificates & secrets > New client secret**. |
| 66 | +3. Add a description for your client secret. |
| 67 | +4. Select a duration. |
| 68 | +5. Select **Add**. |
| 69 | +6. Record the secret's value for use in your client application code - it's never displayed again after you leave this page. |
| 70 | + |
| 71 | +### Add permissions to API |
| 72 | + |
| 73 | +1. Select your application in **App registrations** in the Azure portal. |
| 74 | +2. Select **API permissions > Add a permission**. |
| 75 | +3. Application permissions are for service- or daemon-type applications that need to access API as themselves, without user interaction for sign-in or consent. Unless you've defined application roles for your API. |
| 76 | +4. Select **Add a permission**, and add the following permissions: <br/><img src={useBaseUrl('/img/platform-services/automation-service/app-central/integrations/microsoft-ews/microsoft-ews-5.png')} style={{border:'1px solid gray'}} alt="/microsoft-ews" width="800"/> |
| 77 | + |
| 78 | +#### EWS API to be configured for these permissions |
| 79 | + |
| 80 | +Applications are authorized to call APIs when they are granted permissions by users or administrators as part of the consent process. The list of configured permissions should include all the permissions the application needs. |
| 81 | + |
| 82 | +**API / Permissions** |
| 83 | + |
| 84 | +Microsoft Graph (7) |
| 85 | + |
| 86 | +* Contacts.Read |
| 87 | + + Type: Application |
| 88 | + + Description: Read contacts in all mailboxes |
| 89 | + + Admin: - |
| 90 | +* Mail.Read |
| 91 | + + Type: Application |
| 92 | + + Description: Read mail in all mailboxes |
| 93 | + + Admin: Yes |
| 94 | +* Mail.ReadBasic |
| 95 | + + Type: Delegated |
| 96 | + + Description: Read user basic mail |
| 97 | + + Admin: - |
| 98 | +* Mail.ReadBasic |
| 99 | + + Type: Application |
| 100 | + + Description: Read basic mail in all mailboxes |
| 101 | + + Admin: Yes |
| 102 | +* Mail.ReadBasic.All |
| 103 | + + Type: Application |
| 104 | + + Description: Read basic mail in all mailboxes |
| 105 | + + Admin: Yes |
| 106 | +* Mail.Send |
| 107 | + + Type: Application |
| 108 | + + Description: Send mail as any user |
| 109 | + + Admin: Yes |
| 110 | +* MailboxItem.Read.All |
| 111 | + + Type: Application |
| 112 | + + Description: Read all the users' mailbox items |
| 113 | + + Admin: Yes |
| 114 | + |
| 115 | +Office 365 Exchange Online (3) |
| 116 | + |
| 117 | +* Exchange.ManageAsApp |
| 118 | + + Type: Application |
| 119 | + + Description: Manage Exchange As Application |
| 120 | + + Admin: Yes |
| 121 | +* full\_access\_as\_app |
| 122 | + + Type: Application |
| 123 | + + Description: Use Exchange Web Services with full access to all mailboxes |
| 124 | + + Admin: Yes |
| 125 | + |
| 126 | +`full\_access\_as\_app` uses Exchange Web Services with full access to all mailboxes. |
| 127 | + |
| 128 | +Once API permission are added, then an administrator must consent to grant these permissions. [Learn more about permissions and consent](https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent?WT.mc_id=Portal-Microsoft_AAD_RegisteredApps). |
| 129 | + |
| 130 | +### Assign the required roles in the Exchange Admin Center |
| 131 | + |
| 132 | +1. Sign in to the [Exchange Admin Center (EAC)](https://admin.exchange.microsoft.com/#/). |
| 133 | +2. In the EAC, navigate to **Roles**. |
| 134 | +3. Click **Admin Roles**. |
| 135 | +4. Search for the role **Discovery Management** and click on it. |
| 136 | +5. Click on the **Assign** tab. |
| 137 | +6. Click **+** and search for the user you want to assign the role to. |
| 138 | +7. Click **Save**. |
| 139 | + |
| 140 | +## Configure Microsoft EWS in Automation Service and Cloud SOAR |
| 141 | + |
| 142 | +import IntegrationsAuth from '../../../../reuse/integrations-authentication.md'; |
| 143 | +import IntegrationCertificate from '../../../../reuse/automation-service/integration-certificate.md'; |
| 144 | +import IntegrationEngine from '../../../../reuse/automation-service/integration-engine.md'; |
| 145 | +import IntegrationLabel from '../../../../reuse/automation-service/integration-label.md'; |
| 146 | +import IntegrationProxy from '../../../../reuse/automation-service/integration-proxy.md'; |
| 147 | +import IntegrationTimeout from '../../../../reuse/automation-service/integration-timeout.md'; |
| 148 | +import CloudSOARAPIURL from '../../../../reuse/automation-service/cloud-soar-api-url.md'; |
| 149 | +import AccessID from '../../../../reuse/automation-service/access-id.md'; |
| 150 | +import AccessKey from '../../../../reuse/automation-service/access-key.md'; |
| 151 | + |
| 152 | +<IntegrationsAuth/> |
| 153 | + |
| 154 | +:::note |
| 155 | +Use the information you set up [above](#microsoft-ews-configuration). |
| 156 | +::: |
| 157 | + |
| 158 | +* <IntegrationLabel/> |
| 159 | +* **Host**. Enter your Microsoft EWS host address, for example, `outlook.office365.com` |
| 160 | + |
| 161 | +* **Tenant ID**. Enter the [tenant ID](https://learn.microsoft.com/en-us/entra/fundamentals/how-to-find-tenant) for authentication. |
| 162 | + |
| 163 | +* **Client ID**. Enter the client ID for authentication. |
| 164 | + |
| 165 | +* **Client Secret**. Enter the client secret for authentication. |
| 166 | + |
| 167 | +* **Microsoft Graph Scope**. Enter the scope. |
| 168 | + |
| 169 | +* **Mailbox**. Enter the mailbox address. |
| 170 | + |
| 171 | +* <IntegrationTimeout/> |
| 172 | +* <IntegrationCertificate/> |
| 173 | +* <CloudSOARAPIURL/> |
| 174 | +* <AccessID/> |
| 175 | +* <AccessKey/> |
| 176 | +* <IntegrationEngine/> |
| 177 | +* <IntegrationProxy/> |
| 178 | + |
| 179 | +<img src={useBaseUrl('/img/platform-services/automation-service/app-central/integrations/misc/microsoft-ews-graph-configuration.png')} style={{border:'1px solid gray'}} alt="Microsoft EWS configuration" width="400"/> |
| 180 | + |
| 181 | +For information about Microsoft EWS, see [Microsoft Exchange Web Services documentation](https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-authenticate-an-ews-application-by-using-oauth). |
| 182 | + |
| 183 | + |
| 184 | +## Category |
| 185 | + |
| 186 | +Email Gateway |
| 187 | + |
| 188 | +## Change Log |
| 189 | + |
| 190 | +* September 10, 2025 - First upload |
0 commit comments