Skip to main content
Deploy Runlayer hooks to macOS devices managed by Mosyle Business.

Prerequisites

  • Mosyle Business admin access
  • Configured enrollment key from Runlayer (see below)
Enrollment keys allow devices to automatically register with Runlayer and obtain API credentials.Enrollment Keys List
1

Navigate to Enrollment Keys

Go to Settings in the Runlayer dashboard and select the Enrollment Keys tab
2

Create a New Key

Click + Create Enrollment KeyCreate Enrollment Key
3

Configure the Key

  • Name (required): Enter a descriptive name (e.g., “Production MDM”)
  • Description (optional): Add context about the key’s purpose
4

Copy the Key

Copy the generated key (starts with rl_enroll_) and store it securelyEnrollment Key Created
Enrollment keys are shown only once. Store them securely and treat them like passwords.

Deployment Steps

1

Generate the Script

Fill in your organization’s settings below to generate a customized deployment script.Mosyle-specific configuration tips:
  • ENROLLMENT_USERNAME: Use the Mosyle variable %Email% to provide the user’s identity.
  • ENROLLMENT_DEVICE_NAME: Use the Mosyle variable %DeviceName% to identify the device.
2

Create a Custom Command

  1. Under the Management tab, select Custom Commands
  2. Click Add new profile
  3. Provide a Name (e.g., “Runlayer Hooks”), check Enable variables for this profile, and paste the generated script into the code box
  4. Switch to the Execution Settings tab and configure the execution frequency
3

Assign to Devices

Click Add assignment to assign the profile to all devices that should have hooks installed
4

Save and Deploy

Click Save to begin deployment to target devices

Verification

1

Check Analytics

Navigate to Analytics in the Runlayer dashboard
2

Verify Devices

Confirm that devices are appearing with hooks installed
3

Test Interception

Have a user trigger a shadow MCP tool call and verify it appears in audit logs

Log Locations

PlatformLog Location
macOS/var/log/runlayer-hooks.log

Exit Codes

CodeMeaning
0Success
1General failure (missing config, enrollment failed)
2Network failure
3Installation failure