> For the complete documentation index, see [llms.txt](https://docs.fusion.vectra.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fusion.vectra.ai/cloud-onboarding/azure-cloud-onboarding/quickstart-azure/add-context-integration.md).

# Add Context Integration to Fusion

Access [Azure Cloud Shell](https://portal.azure.com/#cloudshell/) to run CLI commands from your web browser using az.

1. Create a new **App Registration** with 'accounts in this organizational directory only' preselected.

You can use any **Display Name** you want. For this example, we'll use netography-context.

{% tabs %}
{% tab title="Command" %}

```shell
az ad app create --display-name netography-context --sign-in-audience AzureADMyOrg
```

{% endtab %}
{% endtabs %}

2. Print the Application (Client) ID and save it, this is needed for the following steps.

{% tabs %}
{% tab title="Command" %}

```shell
az ad app list --display-name netography-context --query "[].{appId:appId}" --output tsv
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**📘Save the password provided by the output from the following command**

You will only be shown this *one time* and can never retrive this again, including from the Azure Portal UI.\
This password is the **Client Secret Value** needed by Vectra Fusion.
{% endhint %}

3. Create a **Client Secret** and set the expiration date consistent with your company policies; for this example, we'll choose 24 months, which is the maximum.

{% tabs %}
{% tab title="Command" %}

```shell
az ad app credential reset --id <Your appID> --append --end-date "2026-10-23"
```

{% endtab %}
{% endtabs %}

Your output should look similar to the following, make sure you **save the password**:

> The output includes credentials that you must protect. Be sure that you do not include these credentials in your code or check the credentials into your source control. For more information, see <https://aka.ms/azadsp-cli>
>
> {\
> "appId": "XXXXX-XXXX-XXXX-XXXX-XXXXXXXXX",\
> "password": "XXXX~~XXXXXXXXXXXX.dIc~~XXXXXXXXX",\
> "tenant": "XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"\
> }

4. Retrieve the **Object ID** of your **App Registration**, which is needed to create a **Service Principal** in the next step.

{% tabs %}
{% tab title="Command" %}

```shell
az ad app show --id <Your appID> --query "id"
```

{% endtab %}
{% endtabs %}

5. Create a **Service Principal** for your **App Registration**, this is required for the the next step.

{% tabs %}
{% tab title="Command" %}

```shell
az ad sp create --id <Your App Registration Object ID>
```

{% endtab %}
{% endtabs %}

6. Retrieve the **Object ID** of your **Service Principal**, this is required for the **Role Assignment** step.

{% tabs %}
{% tab title="Command" %}

```shell
az ad sp show --id <Your appID> --query "id"
```

{% endtab %}
{% endtabs %}

7. Retrieve the **Subscription ID** we're working in, this is required for the **Role Assignment** step.

{% tabs %}
{% tab title="Command" %}

```shell
az account show --query id --output tsv
```

{% endtab %}
{% endtabs %}

8. Select the **Role Assignment** for your **App Registration**.

```
az role assignment create --assignee-object-id <Your Service Principal Object ID> --role "Reader" --scope /subscriptions/<Your Subscription ID>
```

## Add context integration to Vectra Fusion <a href="#add-context-integration-to-vectra-fusion" id="add-context-integration-to-vectra-fusion"></a>

1. Navigate to **Settings** -> **Context Integrations** -> **Add Integration**

![](/files/YcrCVFUiAYLslgU3MDvt)

2. Select **Microsoft Azure**

![](/files/O4U1K7HY7kjkvzTLFBDL)

3. Fill out the Azure Context Integration form:

**Name**: Use any name here.

**Update Interval**: Leave as default.

**Auto Update**: Leave enabled.

**Subscription ID**: The Subscription ID you used to complete the instructions in this document.

Run the following command to retrieve this information:

{% tabs %}
{% tab title="Command" %}

```shell
az account show --query id --output tsv
```

{% endtab %}
{% endtabs %}

**Tenant ID**: Your Azure Tenant ID.

Run the following command to retrieve this information:

{% tabs %}
{% tab title="Command" %}

```shell
az account show --query tenantId --output tsv
```

{% endtab %}
{% endtabs %}

**Tag/Label Matches**: Leave as default unless you know how to use this feature.

**Application Client ID**: Enter the "Applicant (Client) ID"

Run the following command to retrieve this information:

{% tabs %}
{% tab title="Command" %}

```shell
az ad app list --display-name netography-context --query "[].{appId:appId}" --output tsv
```

{% endtab %}
{% endtabs %}

**Client Secret Value**: This is the password you saved from **Step 3** in this document.

4. Click **Create and Run**


---

# 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.fusion.vectra.ai/cloud-onboarding/azure-cloud-onboarding/quickstart-azure/add-context-integration.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.
