# Azure Log Analytics

## Connection Requirements

{% stepper %}
{% step %}

### Domain

Url Address:

> 🔵 **Default:**\
> api.loganalytics.io
> {% endstep %}

{% step %}

### Tenant ID

Follow these steps to retrieve the ID for an Azure AD tenant in the Azure portal:

* Sign in to the Azure portal.
* Confirm that you are signed into the tenant for which you want to retrieve the ID. If not, switch directories so that you're working in the right tenant.
* Under the Azure services heading, select Azure Active Directory.
* Find the Tenant ID in the Basic information section of the Overview screen.
* Copy the Tenant ID.
  {% endstep %}

{% step %}

### Workspace IDs

Workspace IDs are the unique identifiers for your Azure Log Analytics workspaces. You can find them in the Azure portal.

Note: No asset will be fetched if you don't provide valid workspace IDs.
{% endstep %}

{% step %}

### Client ID

Steps to obtain the Client (Application) ID:

* Login into your Azure account.
* Select Azure Active Directory in the left sidebar.
* Click Enterprise applications.
* Click All applications.
* Select the application which you have created.
* Click Properties.
* Copy the Application ID.
  {% endstep %}

{% step %}

### Client Secret

Steps to create and retrieve a Client Secret:

* Navigate to your app registration in the Azure portal.
* Select the Certificates & secrets setting.
* Under Client secrets, click New client secret to create a new secret.
* Provide a description for the secret, and choose the desired expiration interval.
* Immediately copy the value of the new secret to a secure location. The full value is displayed to you only once.
  {% endstep %}

{% step %}

### Query

Query that will be executed on Azure Log Analytics. Your response will come according to your query.

Important: Ensure the primary key in your query result is "Computer".
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
Please perform a **connection test** to ensure there is a valid connection to the host.

When the discovery operation is finalized, you will be able to see the details on the **Assets** page.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.octoxlabs.com/adapters/adapters/azure-log-analytics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
