# Distribute macOS installer

## Overview

You can easily add the Adaptiva macOS client installer as a macOS app (PKG) in Microsoft Intune. This will distribute the client to macOS devices and configure their connection to the Adaptiva server.

If you are using a SaaS instance, the installation configuration will differ. Skip to the instructions for a [SaaS client deployment using Intune](#saas-client-deployment-using-intune).

### Access the Adaptiva Client

The Adaptiva Client is available from the Installation folder of the installation media. You can download the latest release from the [Product Releases](https://support.adaptiva.com/hc/en-us/sections/201965326-Product-Releases) section of the Adaptiva Support Portal.

### Create macOS App

1. Log into the Microsoft Intune admin center (<https://intune.microsoft.com>) using the account with the appropriate role assignment.
2. In the left-hand navigation pane, click **Apps**, then click **All Apps**.

   ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-eb3f2e2a75038d7a67d6c334d9227574956019fa%2Fimage79.png?alt=media)
3. Click **+ Add**.
4. In the Select app type pane, click the **App type** drop-down.
5. Under the Other app types, select **macOS app (PKG)**.

   ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-2bcf55eaead7cfa3c727fa6c8655d412f9fcfcff%2Fselect-app-macos-pkg.png?alt=media)
6. Click **Select** to open the Add App steps.

### Select the app package file

1. On the **App Information** pane, click **Select app package file**.

   ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-58680a009ff8afaf6dc04e92f1b9abedc1a37fb8%2Fselect-app-package.png?alt=media)
2. In the App package file pane, select the **Browse** button. Browse to the path where the installation files were located and select the `adaptiva-client-<version>-macOS.pkg` file. Click **Open**. The app details are displayed.
3. Click **OK** on the App package file pane to add the app.
4. On the **App information** page, update the properties with these and any other values as appropriate. These are user facing values.

   ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-ef845cbe7a8b010e0f57056a64ae48ee9d7e6c23%2Fapp-information.png?alt=media)

   * **Name** and **Description**: Update the name and description to user friendly values.
   * **Publisher**: Adaptiva
5. Complete any addition app information and click **Next**.
6. On the **Program** page, enter the following **Post-install script**:

   ```bash
   #! /bin/bash
   sudo /opt/adaptiva/adaptivaclient/bin/adaptivactl setup -server <hostname> -server-guid <guid>
   ```

   * Update the configuration script with any valid parameters. See the [adaptivactl command line parameters](https://docs.adaptiva.com/platform-install/client-install-and-uninstall/client-install/client-install-linux-macos#adaptivactl-command-line-parameters) reference for details.

   ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-edcd2ea6cdf2a6aa50be015d01def8054a92db1b%2Fadd-app-program.png?alt=media)
7. Click **Next**.
8. Click the Minimum operating system drop-down and select **macOS Ventura 13.0**.

   ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-efd2e5e25de66918418ca15bfcf715976d3fd364%2Fadd-app-requirements.png?alt=media)
9. Click **Next**.
10. On the **Detection Rules** tab, ensure **Yes** is selected for ignore app version. Update the **App Version** to the version listed in the name of the .pkg file.
11. Click **Next**.
12. On the **Supersedence** and **Scope tags** tabs, click **Next**.
13. On the **Assignments** tab, configure assignments for the following groups. Assignments do not need to be entered right now; they can be entered later.

    ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-57b89549d33b6b9c786fb43e2699d12ce7e450c2%2Fimage94.png?alt=media)

    Add a group to **Required** to force the installation.

    Add a group to **Available** for enrolled devices to make the installation optional via the Company Portal app. When adding a group to Available, the group must contain Users, not Devices.

    Add a group to **Uninstall** for managed devices to have this app removed.
14. Click **Next**.
15. Review the App information and click **Create**.

## SaaS Client Deployment using Intune

If you are using a SaaS instance, you can access the macOS installation script (`adaptiva-client-<version>-install-unix.sh`) from the Cloud Admin Portal.

![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-0d522b0ddb5854677f6569aab06f5b5088548d73%2Fcloud-admin-client-download.png?alt=media)

{% hint style="info" %}
If the Authorization token is updated, you must re-download the installation script and update your macOS script. See these instructions [if the authorization token is updated](#if-authorization-token-updated).
{% endhint %}

1. Log in to your cloud tenant and click the **settings gear > Settings > Client Downloads**. Download the macOS Client installation script to an accessible location.
2. Log into the Microsoft Intune admin center (<https://intune.microsoft.com>) using the account with the appropriate role assignment.
3. In the left-hand navigation pane, click **Devices**.
4. Under **By platform**, click **macOS**. Then under **Manage devices**, click **Scripts**.

   ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-13994dcc32eef2f0013838e6f1e588f3f59cd69e%2Fadd-macos-script.png?alt=media)
5. Click **+ Add**.

   ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-869cdc18ed4a5ebd365990d268ed3633078d618a%2Fmacos-script-basics.png?alt=media)
6. On the **Basics** page, enter a **Name** and **Description** for the script policy, then select **Next**.
7. On the **Script settings** page, click the **Browse** button. Browse to the path where the macOS install script is located and select the `adaptiva-client-<version>-install-unix.sh` file. Click **Open**. The script details are displayed.
8. Configure the following script settings:

   * Run script as signed-in user: **No**
   * Hide script notifications on devices: **Not Configured**
   * Script frequency: **Not Configured**, this will run the script only 1 time.
   * Max number of times to retry if script fails: **Not Configured**.

   ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-73319a67c67e305379b299dd044e66aa6fbc9a81%2Fmacos-script-addscript.png?alt=media)
9. Select **Next**.
10. On the **Scope tags** tab, click **Next**.
11. On the **Assignments** tab, configure assignments for the following groups. Assignments do not need to be entered right now; they can be entered later.

    ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-6196faeae051a1bf032dddcedf4f72f8cb6a062c%2Fmacos-script-assignments.png?alt=media)

    Add a group to **Included groups** to install the client on these devices.

    Add a group to **Excluded groups** if necessary.
12. Click **Next**.
13. Review the script information and click **Add**.

### If authorization token updated

1. On the macOS | Scripts page, select the previously created script.
2. Under **Manage**, click **Properties**.
3. In the details pane, next to **Settings**, click **Edit**.
4. Click the **Browse** button, and browse to the updated .sh file. Click **Open**.
5. Click **Review + save**.
6. Review the script information and click **Save**.
