Deploying macOS Agent via Intune

Prev Next

Introduction

HP Insights macOS Agent helps enroll and connect macOS devices to HP Workforce Experience Platform (WXP). This article describes how to deploy HPInsightsInstaller.pkg to managed macOS devices by using Microsoft Intune. It also explains how to add the enrollment configuration, configure detection rules, and assign the application to the required device or user groups.

Prerequisites

Before deployment, ensure the following requirements are met:

  • macOS devices are successfully enrolled in Microsoft Intune.

  • The Apple MDM Push Certificate is configured and active.

  • An Intune license is assigned to the target users.

  • HPInsightsInstaller.pkg is finalized and tested for silent installation.

  • The Company PIN is available (if enrollment JSON configuration is required).

  • The required Microsoft Entra ID (Azure AD) device or user group is created for assignment.

Overview of the Deployment Process

  1. Uploading HPInsightsInstaller.pkg to Intune

  2. Configuring application metadata

  3. Configuring a pre-install enrollment script

  4. Setting detection rules

  5. Defining Requirements

  6. Assigning the application to device or user groups

Concept

Purpose

PKG deployment

Installs the HP Insights macOS Agent

Pre-install script

Creates enrollment.json and required configuration before the agent installation starts.

enrollment.json

Provides the company PIN or enrollment information required for device registration

Step 1: Uploading HPInsightsInstaller.pkg to Intune

  1. Log in to the Intune Admin Center.

  2. Click Apps > macOS > Add.

  3. Select macOS app (PKG).

  4. Click Select.

  5. Upload the HPInsightsInstaller.pkg file.

  6. Click OK.

HPInsightsInstaller.pkg installs the HP Insights macOS Agent on managed macOS devices. The agent connects the device to WXP after installation and enrollment.

Step 2: Configuring App Information

Add the following details and click Next:

  • Name: HP Insights macOS Agent

  • Description: Provide an appropriate description.

  • Publisher: HP

  • Category: Applications

  • Logo: Optional.

Step 3: Configuring Pre-Install Script

Use the pre-install script only if your deployment requires the enrollment.json file to be created on the device before the HP Insights Agent is installed. If your package already includes the required enrollment configuration, or if another deployment method creates the file, this step may not be required.

This step is mandatory for silent enrollment.

Script 1

#!/bin/bash 
 
APPLICATION_SUPPORT_DIRECTORY=/etc/APMAgent 
PIN=######### 
 
if [ ! -d "$APPLICATION_SUPPORT_DIRECTORY" ]; then 
    mkdir -p "$APPLICATION_SUPPORT_DIRECTORY" 
fi 
 
echo "{\"PIN\":\"$PIN\"}" > "$APPLICATION_SUPPORT_DIRECTORY/enrollment.json" 
if [ -f "$APPLICATION_SUPPORT_DIRECTORY/enrollment.json" ]; then 
    exit 0 
else 
    exit 1 
fi 

Script 2

Enrollment_Tray.sh (Hide Menu Bar Option) 
#!/bin/bash 
 
APPLICATION_SUPPORT_DIRECTORY=/etc/APMAgent 
PIN=######### 
 
if [ ! -d "$APPLICATION_SUPPORT_DIRECTORY" ]; then 
    mkdir -p "$APPLICATION_SUPPORT_DIRECTORY" 
fi 
 
echo "{\"PIN\":\"$PIN\",\"HideTray\":\"true\"}" > "$APPLICATION_SUPPORT_DIRECTORY/enrollment.json" 
 
if [ -f "$APPLICATION_SUPPORT_DIRECTORY/enrollment.json" ]; then 
    exit 0 
else 
    exit 1 
fi 

Note: The HideTray value controls whether the HP Insights Agent icon is visible in the macOS menu bar. Set HideTray to true if the menu bar icon must be hidden from end users. Omit this value if the icon must remain visible.

Select the appropriate script based on whether menu icon should be visit; and then paste it into Pre-install script.

Step 4: Defining Requirements

Define the following and click Next:

  • Minimum macOS version: For example, macOS 12 or later.

  • Architecture: Default.

Step 5: Configuring Detection Rules (Critical Step)

Configure the detection rule based on the installed HP Insights Agent app bundle. If the detection rule does not match the installed app, Intune may report the deployment as failed even when the package installs successfully.

If the application installs in the /Applications directory, configure the following:

  • App bundle ID: com.hp.DaasClient.macOS.APMAgent

  • (Optional) Version comparison

Ensure the detection rule matches the actual installation behavior of the package.

Step 6: Configuring Assignments

Select the following assignment type:

  • Required: Installs automatically and silently.

  • Available: Users install the app from the Company Portal.

For automatic silent deployment:

  1. Select Required and assign the application to the appropriate device group.

  2. Click Next.

  3. Click Create.

Contact Us

For any assistance, create a support case or email support@wxp.hp.com.