<h2>Setting Up Exchange Online Integration with Security Incident Response</h2><br/><div style="overflow-x:auto"><p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><strong><span style="font-size: 14.0pt; font-family: Calibri, sans-serif;">Overview</span></strong></p> <p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> </p> <p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-family: Calibri, sans-serif;">The upgraded version of the Security Incident Response integration with Microsoft Exchange Online is a new and robust SIR integration, which operates by utilizing application ID, tenant ID (organization), and client secret to procure a bearer token (JWT) via REST APIs. This new integration doesn't require any Mid-Server or additional PowerShell capabilities. The application object established within Azure AD is assigned a Directory Role, which is then reflected in an access token.</span></p> <p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> </p> <p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><strong><span style="font-size: 14.0pt; font-family: Calibri, sans-serif;">Prerequisites:</span></strong></p> <p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> </p> <p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-family: Calibri, sans-serif;"><strong>Defender for Office 365 Plan 2.</strong></span></p> <p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-family: Calibri, sans-serif;"><span>This integration requires License/Subscription of Defender for Office 365 Plan 2 to fetch email logs or metadata using advanced hunting in Microsoft 365 Defender.</span> </span></p> <p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> </p> <p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-family: Calibri, sans-serif;"><strong>Microsoft Graph API</strong>.</span></p> <p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-family: Calibri, sans-serif;">License/<span class="ui-provider">Subscription</span> of <strong>Microsoft Graph API </strong>is required to fetch email details of specific emails along with its current location and delete status.</span></p> <p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> </p> <p style="margin: 13.5pt 0cm 6.75pt; background: white; font-size: 12pt; font-family: Aptos, sans-serif;"><strong><span style="font-size: 14.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">Step 1: Register the application in Azure AD</span></strong></p> <ol style="margin-top: 0cm; margin-bottom: 0cm; list-style-position: inside;" start="1" type="1"><li style="font-size: 10pt; font-family: Calibri, sans-serif;">Open the Azure AD portal at <span style="color: black;"><a href="https://portal.azure.com/"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #1f8476;">https://portal.azure.com/</span></a></span><span style="font-size: 10.0pt; font-family: Calibri, sans-serif;">.</span></li><li style="font-size: 10pt; font-family: Calibri, sans-serif;">In the <strong>Search</strong> box at the top of the page, start typing <strong>App registrations</strong>, and then select <strong>App registrations</strong> from the results in the <strong>Services</strong> section.</li></ol> <p style="margin: 4.8pt 0cm 6pt 36pt; line-height: 18pt; background: white; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">Or, to go directly to the <strong>App registrations</strong> page, use </span><span style="color: black;"><a href="https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #1f8476;">https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade</span></a></span><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">.</span></p> <ol style="margin-top: 0cm; margin-bottom: 0cm; list-style-position: inside;" start="3" type="1"><li style="font-size: 10pt; font-family: Calibri, sans-serif;">On the <strong>App registrations</strong> page, select <strong>New registration</strong>.</li></ol> <p style="margin: 4.8pt 0cm 6pt 36pt; line-height: 18pt; background: white; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">On the <strong>Register an application</strong> page that opens, configure the following settings:</span></p> <ol style="margin-top: 0cm; margin-bottom: 0cm; list-style-position: inside;" start="3" type="1"><li style="list-style-type: none;"> <ul style="margin-top: 0cm; margin-bottom: 0cm; list-style-position: inside;" type="circle"><li style="font-size: 10pt; font-family: Calibri, sans-serif;"><strong>Name</strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif;">: Enter something descriptive. For example, ExO HuntingAPI.</span></li><li style="font-size: 10pt; font-family: Calibri, sans-serif;"><strong>Supported account types</strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif;">: Verify that <strong>Accounts in this organizational directory only (<YourOrganizationName> only - Single tenant)</strong> is selected.</span></li></ul> </li></ol> <p style="margin: 4.8pt 0cm 0.0001pt 72pt; line-height: 18pt; background: white; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">To make the application multi-tenant for <strong>Exchange Online</strong> delegated scenarios, select the value <strong>Accounts in any organizational directory (Any Azure AD directory - Multitenant)</strong>.</span></p> <p style="margin: 4.8pt 0cm 6pt 36pt; line-height: 18pt; background: white; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">When you're finished on the <strong>App registrations</strong> page, select <strong>Register</strong>.</span></p> <ol style="margin-top: 0cm; margin-bottom: 0cm; list-style-position: inside;" start="4" type="1"><li style="font-size: 10pt; font-family: Calibri, sans-serif;">Leave the app page that you return to open. You'll use it in the next step.</li></ol> <p style="margin: 4.8pt 0cm 6pt; line-height: 18pt; background: white; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;"> </span></p> <p style="margin: 13.5pt 0cm 6.75pt; background: white; font-size: 12pt; font-family: Aptos, sans-serif;"><strong><span style="font-size: 14.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">Step 2: Assign API permissions to the application</span></strong></p> <p style="margin: 4.8pt 0cm 0cm; line-height: 18pt; background: white; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">The procedures in this section replace any default permissions that were automatically configured for the new app. The app doesn't need the default permissions that were replaced.</span></p> <ol style="margin-top: 0cm; margin-bottom: 0cm; list-style-position: inside;" start="1" type="1"><li style="font-size: 10pt; font-family: Calibri, sans-serif;">On the app page under <strong>Management</strong>, select <strong>Manifest</strong>.</li><li style="font-size: 10pt; font-family: Calibri, sans-serif;"><span style="font-family: verdana, sans-serif; font-size: 11px;">On the </span><strong style="font-family: verdana, sans-serif; font-size: 11px;">Manifest</strong><span style="font-family: verdana, sans-serif; font-size: 11px;"> page that opens, find the </span><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #c7254e; background: #F9F9F9;">requiredResourceAccess</span><span style="font-size: 10.0pt; font-family: Calibri, sans-serif;"> entry (on or about line 52).</span></li></ol> <p style="margin: 4.8pt 0cm 6pt 36pt; line-height: 18pt; background: white; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">Modify the </span><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #c7254e; background: #F9F9F9;">resourceAppId</span><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">, </span><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #c7254e; background: #F9F9F9;">resourceAccess id</span><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">, and </span><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #c7254e; background: #F9F9F9;">resourceAccess type</span><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;"> values as shown in the following code snippet:</span></p> <div style="border: dashed #2F6FAB 1.0pt; padding: 12.0pt 12.0pt 12.0pt 12.0pt; background: #F9F9F9; margin-left: 36.0pt; margin-right: 0cm;"> <p style="margin: 0cm 0cm 6.75pt; line-height: 13.2pt; background: #f9f9f9; word-break: break-all; border: none; padding: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Menlo; color: black;">"requiredResourceAccess": [</span></p> <p style="margin: 0cm 0cm 6.75pt; line-height: 13.2pt; background: #f9f9f9; word-break: break-all; border: none; padding: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Menlo; color: black;"> {</span></p> <p style="margin: 0cm 0cm 6.75pt; line-height: 13.2pt; background: #f9f9f9; word-break: break-all; border: none; padding: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Menlo; color: black;"> "resourceAppId": "00000003-0000-0000-c000-000000000000",</span></p> <p style="margin: 0cm 0cm 6.75pt; line-height: 13.2pt; background: #f9f9f9; word-break: break-all; border: none; padding: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Menlo; color: black;"> "resourceAccess": [</span></p> <p style="margin: 0cm 0cm 6.75pt; line-height: 13.2pt; background: #f9f9f9; word-break: break-all; border: none; padding: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Menlo; color: black;"> {</span></p> <p style="margin: 0cm 0cm 6.75pt; line-height: 13.2pt; background: #f9f9f9; word-break: break-all; border: none; padding: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Menlo; color: black;"> "id": "e2a3a72e-5f79-4c64-b1b1-878b674786c9",</span></p> <p style="margin: 0cm 0cm 6.75pt; line-height: 13.2pt; background: #f9f9f9; word-break: break-all; border: none; padding: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Menlo; color: black;"> "type": "Role"</span></p> <p style="margin: 0cm 0cm 6.75pt; line-height: 13.2pt; background: #f9f9f9; word-break: break-all; border: none; padding: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Menlo; color: black;"> },</span></p> <p style="margin: 0cm 0cm 6.75pt; line-height: 13.2pt; background: #f9f9f9; word-break: break-all; border: none; padding: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Menlo; color: black;"> {</span></p> <p style="margin: 0cm 0cm 6.75pt; line-height: 13.2pt; background: #f9f9f9; word-break: break-all; border: none; padding: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Menlo; color: black;"> "id": "dd98c7f5-2d42-42d3-a0e4-633161547251",</span></p> <p style="margin: 0cm 0cm 6.75pt; line-height: 13.2pt; background: #f9f9f9; word-break: break-all; border: none; padding: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Menlo; color: black;"> "type": "Role"</span></p> <p style="margin: 0cm 0cm 6.75pt; line-height: 13.2pt; background: #f9f9f9; word-break: break-all; border: none; padding: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Menlo; color: black;"> }</span></p> <p style="margin: 0cm 0cm 6.75pt; line-height: 13.2pt; background: #f9f9f9; word-break: break-all; border: none; padding: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Menlo; color: black;"> ]</span></p> <p style="margin: 0cm 0cm 6.75pt; line-height: 13.2pt; background: #f9f9f9; word-break: break-all; border: none; padding: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Menlo; color: black;"> }</span></p> <p style="margin: 0cm 0cm 6.75pt; line-height: 13.2pt; background: #f9f9f9; word-break: break-all; border: none; padding: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Menlo; color: black;"> ],</span></p> </div> <p style="margin: 4.8pt 0cm 6pt 36pt; line-height: 18pt; background: white; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">When you're finished on the <strong>Manifest</strong> page, select <strong>Save</strong>.</span></p> <p style="margin: 4.8pt 0cm 6pt 36pt; line-height: 18pt; background: white; font-size: 12pt; font-family: Aptos, sans-serif;"> </p> <p style="margin: 4.8pt 0cm 6pt 36pt; line-height: 18pt; background: white; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10pt;"><span style="font-family: Calibri, sans-serif; color: #2e2e2e;">3. </span>Still on the <strong><span style="font-family: Calibri, sans-serif; color: #2e2e2e;">Manifest</span></strong><span style="font-family: Calibri, sans-serif; color: #2e2e2e;"> page, select </span><strong><span style="font-family: Calibri, sans-serif; color: #2e2e2e;">API permissions</span></strong><span style="font-family: Calibri, sans-serif; color: #2e2e2e;"> under </span><strong><span style="font-family: Calibri, sans-serif; color: #2e2e2e;">Management</span></strong><span style="font-family: Calibri, sans-serif; color: #2e2e2e;">.</span></span></p> <p style="margin: 4.8pt 0cm 6pt 36pt; line-height: 18pt; background: white; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">On the </span><strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">API permissions</span></strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;"> page that opens, do the following steps:</span></p> <ol style="margin-top: 4.8pt; margin-bottom: 6pt; list-style-position: inside;" start="2"><li style="list-style: none; margin: 4.8pt 0cm 6pt 0px; line-height: 18pt; background: white;"> <ol style="margin-top: 4.8pt; margin-bottom: 6pt; list-style-position: inside;"><li style="font-size: 10pt; font-family: Calibri, sans-serif; color: #2e2e2e;"><strong>API / Permissions name</strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">: Verify the value </span><strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #0d0d0d; background: white;">ThreatHunting.Read.All</span></strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #0d0d0d; background: white;"> </span><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">and</span><strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;"> Mail.ReadWrite</span></strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;"> is shown.</span></li><li style="font-size: 10pt; font-family: Calibri, sans-serif; color: #2e2e2e;"><strong>Status</strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">: The current incorrect value is </span><strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">Not granted for <Organization></span></strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">, and this value needs to be changed.</span></li></ol> </li></ol> <p style="margin: 4.8pt 0cm 6pt 72pt; line-height: 18pt; background: white; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">Select </span><strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">Grant admin consent for <Organization></span></strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">, read the confirmation dialog that opens, and then select </span><strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">Yes</span></strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">.</span></p> <p style="margin: 4.8pt 0cm 6pt 72pt; line-height: 18pt; background: white; font-size: 12pt; font-family: 'Times New Roman', serif;"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">The </span><strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">Status</span></strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;"> value should now be </span><strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">Granted for <Organization></span></strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;">.</span></p> <p style="margin: 4.8pt 0cm 6pt 36pt; line-height: 18pt; background: white; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: #2e2e2e;"> </span></p> <p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><strong><span style="font-size: 14.0pt; font-family: Calibri, sans-serif;">Troubleshooting:</span></strong><span style="font-size: 10.0pt; font-family: Calibri, sans-serif;"> If the "ThreatHunting.Read.All" permission is not visible, verify the Defender for Office 365 License. For further information, refer to </span><a style="color: blue; text-decoration: underline;" href="https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/mdo-security-comparison?view=o365-worldwide"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif;">https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/mdo-security-comparison?view=o365-worldwide</span></a><span style="font-size: 10.0pt; font-family: Calibri, sans-serif;">.</span></p> <p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif;"> </span></p> <p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif;"> </span></p> <p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><strong><span style="font-size: 14.0pt; font-family: Calibri, sans-serif;">Limitation:</span></strong></p> <ol style="margin-bottom: 0cm; margin-top: 0px; list-style-position: inside;"><li style="font-size: 10pt; font-family: Calibri, sans-serif;">The availability of data through the Microsoft Threat Hunting API is subject to delays caused by latency between the Exchange Server, Graph API, and Hunting API. Synchronization between the Hunting API and the Exchange server may require a few minutes. The latency period is variable and can differ from one instance to another.<span style="font: 7.0pt 'Times New Roman';"> </span></li><li style="font-size: 10pt; font-family: Calibri, sans-serif;"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: black;">Limitations of hunting API, </span><span style="font-size: 10.0pt; font-family: Calibri, sans-serif; color: black;">Quotas and resource allocation</span><span style="font-size: 10.0pt; font-family: Calibri, sans-serif;"> https://learn.microsoft.com/en-us/graph/api/resources/security-api-overview?view=graph-rest-1.0#advanced-hunting</span></li></ol> <p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif;"> </span></p> <p style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10.0pt; font-family: Calibri, sans-serif;"> </span></p></div>