> For the complete documentation index, see [llms.txt](https://docs.expel.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.expel.io/connect-your-technology/l-p-integrations/microsoft/microsoft-azure-log-analytics-setup-for-workbench.md).

# Microsoft Azure Log Analytics Setup for Workbench

Azure Log Analytics aggregates and provides search capabilities over data in an Azure deployment. Azure Log Analytics functions as a data store for Azure applications, but can also be queried manually.

{% hint style="info" %}
Depending on policy and configuration, Azure Log Analytics can contain all kinds of data relevant to a security team. Most notably, after security audit policies are enabled on Azure VMs, they feed log data to Azure Log Analytics where it can be queried in the Analytics Portal.
{% endhint %}

## Prerequisites

* You must be able to log in to the Microsoft Entra Admin Center as a user assigned the Global Administrator or User Administrator role.

## About Console Permissions

If you grant Read access to your devices, we can investigate the device and the logs more deeply and surface relevant alerts to you in Workbench. Allowing Expel visibility into the console of your security devices helps our SOC analysts make better decisions on whether an alert is benign or malicious. For more information, see [Why Expel Asks for Console Access](/connect-your-technology/about-integrations/why-expel-asks-for-console-access.md).

## Step 1: Enable Console and Cross-Tenant Access for Expel

{% hint style="warning" %}
**If your organization has already created a new Expel account for console access and enabled cross-tenant access for another Microsoft integration, you may skip to** [**Step 2: Enable Azure Application Access**](#step-2-enable-azure-application-access)**.** The same "\<Your Organization GUID>@soc.expel.io" account provides access across all Microsoft services.
{% endhint %}

### Step 1: Enable Console Access for a New Account

Expel requires console access to allow analysts to perform investigation and triage. Without this additional level of information, details cannot be verified by our analysts and an investigation cannot be initiated. For more information, see [Why Expel Asks for Console Access](/connect-your-technology/about-integrations/why-expel-asks-for-console-access.md).

1. [Log in to the Microsoft Entra Admin Center](https://entra.microsoft.com/) as a user assigned the Global Administrator or User Administrator role.
2. Navigate to **Entra ID > Users > All Users**.
3. Select **User > Invite external user**.
4. On the **Basics** tab, include the following:
   * **Email** - use your [Organization GUID](#user-content-fn-1)[^1] to create the email address in the format "\<Your Organization GUID>@soc.expel.io". For example, `a123bc45-aa12-123b@soc.expel.io` .
   * **Display Name** - enter "Expel SOC".
5. On the Assignments tab, configure the following:
   * Select **Add role**.
   * Search for and select **Global Reader**.

{% hint style="info" %}
This role provides read-only access across most Microsoft 365 and Azure management consoles.
{% endhint %}

6. Select **Review + invite** and then **Invite**.

The user account will be added to your directory as a guest, and an invitation will be sent to the email provided.

### Step 2: Enable Cross-Tenant Access

In this step you will add Expel as an external organization and configure inbound trust.

1. Still in the Microsoft Entra Admin Center, navigate to **Entra ID > External Identities > Cross-tenant access settings**.
2. Select the **Organizational settings** tab.
3. Select **Add organization**.
4. On the Add organization pane, enter Expel’s tenant ID: `1cde81fd-b430-4035-b24d-709921922876`
5. Select **Expel** from the search results, and then select **Add**.
6. In the Organizational settings list, locate the **Expel** row and select **Inbound access**.
7. On the "Inbound access settings - Expel" page, select the **Trust settings** tab, and configure the following:
   * Select **Customize settings**.
   * Enable **Trust multifactor authentication from Microsoft Entra tenants**.
   * Enable **Trust compliant devices**.
   * Enable **Trust Microsoft Entra hybrid joined devices**.
   * Under Automatic redemption, enable **Automatically redeem invitations with the tenant Expel**.
8. Select **Save**.

## Step 2: Enable Azure Application Access

1. As an Azure administrator, log in to the [Azure portal](https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize?client_id=c44b4083-3bb0-49c1-b47d-974e53cbdf3c\&amp;response_type=code%20id_token\&amp;scope=https%3A%2F%2Fmanagement.core.windows.net%2F%2Fuser_impersonation%20openid%20email%20profile\&amp;state=OpenIdConnect.AuthenticationProperties%3DJGFT4ipzE329Yi0wpoyDIrv9eOepn_VvvPcWIxBcNdA_eEYCpZsrX10S8Fu_3QmDkwoscJCEgJzgygADBxRdVxO5xMhlAWEXIWDhalOKskaxdCUL2O3yfE69Ft1VpOgOeuK4Oc6Ukoyndm4e0I2lQQFKg73ghJ7z5wdZSeVzmdkgDykx_JVe74ELOwRXV0AIyFWPGjo95SIbkT4heyCgn3gsr54JIx1no3czpkL04Bx2C_UGs5LyHRw8srHcIp9iIptQHRmjevFDaaoVWYnWxdde-gcJ0s1MRwm5r436YqUFBokhosphjrPNENj18sBrlUoZAHQwtfxMyyRHruaHob3e7tJ48v8piIjfgczB0lXme6V0RFlHi--sjgHExHkXyCwByoLTeX-YUopjuUDC9Q\&amp;response_mode=form_post\&amp;nonce=637459945180688826.NTgxNTIzNjQtZDgwYS00NThiLWEzZTItYjg3N2Q5NDVkMGNiNjU5MTJmOWEtYjA5YS00OTk0LWIwMTktNzgwY2M5MzUwYzU1\&amp;redirect_uri=https%3A%2F%2Fportal.azure.com%2Fsignin%2Findex%2F\&amp;site_id=501430\&amp;client-request-id=e86df537-e37a-4631-ad31-ac65a7a51b72\&amp;x-client-SKU=ID_NET45\&amp;x-client-ver=5.3.0.0).
2. Navigate to **App registrations** and click **+New registration**.
3. Fill in the application details. You can fill these in however you want, but we recommend this:
   * **Name** - Expel - Log Analytics API.
   * **Supported account types** - Accounts in this organizational directory only (1st option).
4. After you fill out the fields, select **Register** to create the new application.
5. You should be navigated automatically to the settings page for the **Expel Cloud Service** app you just created.&#x20;

{% hint style="info" %}
If not, navigate to App Registrations > View all applications (if you do not see the new app) > Expel - Log Analytics API.
{% endhint %}

6. Make a note of the **Application (client) ID**, **Application secret**, and the **Directory (tenant) ID** for use in later steps.
7. Open **API permissions**.
8. Select **Add a permission**.
9. Add the following permission: **Log Analytics API > Data.Read**.
10. Navigate to **Log Analytic Workspace > Access Control (IAM) > Add**.

{% hint style="info" %}
The decision on which Log Analytic Workspace to assign the role and user depends on where your security data lives and what information you want to make available to Expel.
{% endhint %}

11. Assign the **Log Analytics Reader** role to the **application** and **user** created in the above steps.

## Step 3: Configure Azure Log Analytics in Workbench

Now that we have the correct access configured and noted the credentials, we can integrate your tech with Workbench.

1. [Log in to Workbench](https://workbench.expel.io/auth/login?orig=%2F).
2. In the side menu, navigate to **Organization Settings > Security Devices**. If you have multiple organizations, you must select the appropriate organization name from the list.
3. Select **Add Security Device**.
4. In the search box, enter “Log Analytics” and then select the Microsoft Azure Log Analytics integration.
5. Fill in the fields like this:
   * For **Name** enter the host name of the Azure Log Analytics device.
   * For **Location** enter Cloud.
   * For **Directory ID**, enter the ID of the Microsoft Entra ID (tenant) in the cloud instance.
   * For **Application ID**, enter the ID of the application with access to Azure Log Analytics.
   * For **Application secret**, enter the key used to authenticate the application.
   * For **Workspace ID**, enter the ID of the workspace within Azure Log Analytics.
6. Select **Save**.

Your device should be created successfully within a few seconds. A few reminders:

* After your connection is healthy, it will take some time for your device to begin polling and receiving data.
* To check on the status, select the downward arrow for your device in the first column and choose **View details**.
* Polling will happen first; data will be received after that. **You must refresh the page to see updates.**
* If your device does not begin polling within 15 minutes, and does not begin receiving data within 30 minutes, [contact our support team for help](/support/how-to-reach-us.md).
* To check if alerts are coming through, navigate to **Dashboards > Alert Analysis**. Scroll to the device you want to check, and select the **Expel Alerts** tab to reveal more alert information. It can take 36 to 72 hours for alerts to appear after setup, as we [tune your device](/workbench-reference/alerts/how-expel-alerts-work.md#device-tuning).

[^1]: - [Log in to Workbench](https://workbench.expel.io/auth/login?orig=%2F).
    - Go to **Organization Settings > My Organization**.
    - On the organization's page, look for the Organization GUID and select the **Copy** button to copy the GUID.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.expel.io/connect-your-technology/l-p-integrations/microsoft/microsoft-azure-log-analytics-setup-for-workbench.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
