
## Configure custom domains for Microsoft Excel

URL: https://docs.atlan.com/product/integrations/collaboration/spreadsheets/how-tos/configure-custom-domains-for-microsoft-excel

> If your Atlan tenant is hosted on a custom domain - for example, `https://<your-tenant-name>.mycompany.com`  - you will need to configure your Atlan tenant to deploy the Atlan add-in for Microsoft Excel.

:::warning Who can do this?
 You will need your Microsoft 365 administrator to complete these steps - you may not have access yourself. Before you begin, you may need to [Determine if Centralized Deployment of add-ins works for your organization](https://learn.microsoft.com/en-us/microsoft-365/admin/manage/centralized-deployment-of-add-ins?view=o365-worldwide).

:::

If your Atlan tenant is hosted on a custom domain - for example, `https://<your-tenant-name>.mycompany.com`  - you will need to configure your Atlan tenant to deploy the Atlan add-in for Microsoft Excel.

## Prerequisites

- [The Atlan add-in must be centrally deployed from the Microsoft 365 admin center](https://docs.atlan.com/llms/governance/integrations/integrate-atlan-with-microsoft-excel/llms.txt).
- You must have access to a Windows machine to install Microsoft PowerShell.

## Install PowerShell

Install PowerShell to deploy the Atlan add-in for custom domains:

- Windows: PowerShell comes pre-installed on most modern Windows systems. If you need to upgrade the package, you can download it from the [Microsoft website](https://github.com/PowerShell/PowerShell/releases/tag/v7.3.9).
- macOS: Open Terminal and run:

 ```shell
 brew install --cask powershell
 ```

- Linux: Open Ubuntu and run:

 ```shell
 sudo apt-get update
 sudo apt-get install -y powershell
 ```

For other distributions, refer to Microsoft's [PowerShell installation guide](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.3).

## Configure the add-in for Microsoft Excel

To install the Atlan add-in directly in Microsoft Excel:

1. Open PowerShell and run the following command to install the required module:

 ```shell
 Install-Module -Name O365CentralizedAddInDeployment -Scope CurrentUser
 ```

2. Run the following command to import the module:

 ```shell
 Import-Module -Name O365CentralizedAddInDeployment
 ```

3. Run the following command to connect to the organization add-in service:

 ```shell
 Connect-OrganizationAddInService
 ```

4. In the _Microsoft_ authorization dialog, select an account to authenticate the connection.
5. (Optional) Run the following command to list existing add-ins in the organization:

 ```shell
 Get-OrganizationAddIn
 ```

6. Run the following command to set a custom domain for the Atlan add-in:

 ```shell
 Set-OrganizationAddInOverrides -ProductId <your-product-ID> -AppDomains "<your-custom-domain>"
 ```

 - Replace `<your-product-ID>` with the product ID of the Atlan add-in.
 - Replace `<your-custom-domain>` with your organization's custom domain.

## (Optional) Troubleshooting add-in connectivity

:::warning Who can do this?
 Any individual in your organization with access to Microsoft Excel and Atlan tenant on a custom domain.

:::

This section is optional if you deployed the Atlan add-in for the first time in your organization after completing the steps above. Your users will be able to [connect Atlan to Microsoft Excel](https://docs.atlan.com/llms/governance/integrations/integrate-atlan-with-microsoft-excel/llms.txt) from your custom domain.

However, if any user tried to set up the add-in prior to the configuration above, they may not able to connect Atlan to Microsoft Excel. In that case, Atlan recommends clearing the add-in cache using the following steps.

### Clear Microsoft Excel Online cache 

To clear the local storage of your Microsoft Excel online app, from Google Chrome:

1. Open a blank Microsoft Excel workbook.
2. From the top right of your browser, click the vertical three dots icon for more menu options.
3. From the more options menu, click **More Tools** and then click **Developer Tools**.
4. In the top menu of developer tools, click **Application**.
5. In the left menu of the _Application_ tab, under _Storage_, click **Local storage**.
6. Find an entry for `https://***-excel.officeapps.live.com`. Right-click on the entry and then click **Clear**.
7. Refresh the Microsoft Excel Online app in your browser.

### Clear Microsoft Excel cache on Mac

To clear the Microsoft Excel cache on Mac:

1. Close Microsoft Excel.
2. Use the _Finder_ to navigate to the `/Users/<user>/Library/Containers/com.microsoft.Excel/Data/Library/Application Support/Microsoft/Office/16.0/Wef.` folder.
3. Search for `a313dc5c-6ca5-4346-abfc-c84c57d4b9dc` and delete all the files and folders returned in the search results.
4. Restart your Microsoft Excel app.

### Clear Microsoft Excel cache on Windows

To clear the Microsoft Excel cache on Windows:

1. Open Microsoft Excel.
2. From the ribbon, navigate to **File** > **Options** > **Trust Center** > **Trust Center Settings** > **Trusted Add-in Catalogs**.
3. In _Trusted Web Add-in Catalogs_, select the checkbox **Next time Office starts, clear all previously-started web add-ins cache**.
4. Close Microsoft Excel and then restart it to clear the add-in cache. Once it has restarted, the checkbox will be deselected automatically.

---
