Skip to main content
Intune accepts one shell script per policy, and it has no script parameters. Generate a standalone installer with your SafeDep Cloud credentials embedded, then upload that file.
A SafeDep subscription is required to sync PMG events with SafeDep Cloud.
You need a SafeDep Cloud API key and Tenant ID from app.safedep.io/settings/api-keys. Installs sync to Package Guard.

Install

  1. Clone pmg and generate the installer from scripts/mdm/:
    You can optionally add --config /path/to/config.yml to package a machine-wide config. Set cloud.enabled: true in that file.
Base64 is not encryption. Anyone who can read the uploaded installer in Intune can recover the credentials. Use a scoped, revocable API key. Do not commit the generated artifacts.
  1. Follow Microsoft’s procedure for macOS shell scripts. Upload the generated pmg_setup_install_macos_standalone.sh. Set Run script as signed-in user to No.
  2. Assign the policy to a device group. Use a recurring install frequency so later sign-ins receive Cloud credentials. Only the logged-in user can receive them during a run.
The generated script stays under Intune’s 1 MB size limit.

Uninstall

Upload pmg_uninstall_macos_standalone.sh from the same output directory, with the same Run script as signed-in user setting. Do not assign the install and uninstall policies at the same time.

Other MDMs

Jamf, JumpCloud, and the script layout.

MDM scripts README

Source of truth in the PMG repo.