# Microsoft Azure Virtual Desktop connector

{% hint style="warning" %}
This documentation references external sources. Nexthink does not have control over the accuracy of third-party documentation, nor any external updates or changes that might create inconsistencies with the information presented on this page. Please report any errors or inconsistencies to [Nexthink Support](https://support.nexthink.com/).
{% endhint %}

The connector for Microsoft Azure Virtual Desktop (AVD) allows you to import device organizational information about virtual desktops, such as host pool or the type of desktop virtualization. The feature is scheduled to run automatically and communicate with an Azure app according to the configuration of the Azure portal.

## Prerequisites <a href="#connectorformicrosoftazurevirtualdesktop-prerequisites" id="connectorformicrosoftazurevirtualdesktop-prerequisites"></a>

1. [Register a new application](https://docs.microsoft.com/en-us/graph/auth-register-app-v2) in Azure portal.
   * During the registration process, make sure to select the **Single tenant** option.
   * For the Redirect URI part, using the drop-down list, select **Web**.
2. [Assign](https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal) the [Desktop Virtualization Host Pool Reader](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#desktop-virtualization-host-pool-reader) role to the Service Principal of the Azure app.
3. To retrieve the disk image information, assign a role with `Microsoft.Compute/virtualMachines/read` permissions to the Service Principal. Assign the [Virtual Machine User](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#virtual-machine-user-login) built-in role or create a custom role for this purpose.
4. Install the latest version of the Nexthink data collector on your virtual desktops.

{% hint style="info" %}
Refer to [Installing Collector on Windows](https://docs.nexthink.com/platform/configuring_nexthink/bringing-data-into-your-nexthink-instance/deploying-nexthink-in-non-vdi-environment/installing-collector/installing-collector-on-windows) for more information.
{% endhint %}

## Device fields <a href="#connectorformicrosoftazurevirtualdesktop-devicefields" id="connectorformicrosoftazurevirtualdesktop-devicefields"></a>

The following device virtualization fields are imported.

| Nexthink Field                   | Description                                                                                                     |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| Virtualization desktop pool name | Hardware characteristics of the associated VMs                                                                  |
| Virtualization desktop pool type | <p>Type of the desktop pool. Possible values are:</p><ul><li>shared</li><li>personal</li><li>pooled</li></ul>   |
| Virtualization hypervisor name   | Hardware virtualization system which is being used. In this case, the hypervisor name will always be *Azure*.   |
| Virtualization instance size     | A predefined configuration that determines the CPU, memory and storage which is allocated to a virtual machine. |
| Virtualization region            | Geographical areas where one or more Microsoft Azure data centers are located.                                  |
| Environment name                 | Name of the connector instance which enriches the virtual device.                                               |
| Desktop broker                   | Name of the desktop virtualization broker product being used. In this case, `azure_virtual_desktop`             |

For more information, please refer to [nql-data-model](https://docs.nexthink.com/platform/understanding-key-data-platform-concepts/nql-data-model "mention") documentation.

## Configuring the Nexthink web interface <a href="#connectorformicrosoftazurevirtualdesktop-configuringthenexthinkwebinterface" id="connectorformicrosoftazurevirtualdesktop-configuringthenexthinkwebinterface"></a>

1. Go to **Administration** > **Inbound connectors**.
2. Click the **New connector** button in the top-right corner of the page.
3. Select **Azure Virtual Desktop** from the list of connectors.

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-57e6b16fb79d352b5afdf12fe4237cfdb422e6ff%2Finbound-connectors.png?alt=media" alt="Inbound connectors"><figcaption></figcaption></figure>

### Activating the connector <a href="#connectorformicrosoftazurevirtualdesktop-f.a.q" id="connectorformicrosoftazurevirtualdesktop-f.a.q"></a>

Activate the connection between your Nexthink instance and Azure Active Directory (Azure AD) by entering the following Azure AD credentials on this page:

* **Name**: Enter a meaningful name for the connector.
* **Tenant ID:** Directory (tenant) ID from the Overview section of the Azure portal.
* **Subscription ID:** Previously saved Subscription ID from the Azure portal.
* **Client ID:** Application (tenant) ID from the Overview section of the Azure portal.
* **Client Secret:** Enter the client secret, which you can generate in the Azure portal using the **Certificates and secret** option as follows:
  * Click on **New client secret**.
  * Fill in the **Description** and **Expiration** values.
  * Click **Add** and copy the content from the **Value** column.

Refer to the [Microsoft documentation](https://docs.microsoft.com/en-gb/azure/active-directory/develop/howto-create-service-principal-portal#option-2-create-a-new-application-secret) for more information.

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-a68f9b3470b1cc2570772e33381bd94b6484741c%2Fimage.png?alt=media" alt="Connector credentials for Azure Virtual Desktop"><figcaption></figcaption></figure>

## FAQ <a href="#connectorformicrosoftazurevirtualdesktop-f.a.q" id="connectorformicrosoftazurevirtualdesktop-f.a.q"></a>

<details>

<summary>What is the connector for Azure Virtual Desktop used for?</summary>

To enrich Nexthink device data from Azure Virtual Desktop by importing information like the host pool or the type of desktop virtualization. This is done in order to enhance device visualization.

</details>

<details>

<summary>How do we troubleshoot the connector for Azure Virtual Desktop?</summary>

Currently, the only way to troubleshoot issues with the connector for Azure Virtual Desktop is to reach out to [Nexthink support](https://support.nexthink.com/).

</details>
