Skip to content
This repository was archived by the owner on Oct 19, 2026. It is now read-only.

Commit 7a82e00

Browse files
committed
Sync open source content 🐝 (from 105df2bd6385f5ab5a650a1694b10898447e62cf)
1 parent 6ee9edf commit 7a82e00

1 file changed

Lines changed: 33 additions & 13 deletions

File tree

  • docs/ai-control-plane/reference/device-agent/mdm-installations

‎docs/ai-control-plane/reference/device-agent/mdm-installations/index.mdx‎

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ description: "Deploy the device agent through your MDM, verify the rollout with
44
---
55

66
import { Callout, StatusBadge } from "@/mdx/components";
7+
import { CodeWithTabs } from "@/components/code-tabs";
78

89
Rolling the device agent out through an MDM has two halves. First, **deploy**: your MDM installs the agent and delivers its managed configuration so every device enrolls without any interactive login. Second, **verify**: connect the same MDM to the dashboard so the platform can pull your managed-device inventory and show exactly which devices are covered by a running agent, and which aren't. Optionally, a third: **export** that coverage into your compliance platform so it becomes continuously-tested evidence.
910

@@ -28,18 +29,36 @@ Upload that file to your MDM as a Package (Jamf), Custom App (Iru), or line-of-b
2829

2930
## The managed configuration
3031

31-
The agent recognizes a user through a managed configuration delivered by IT. No browser flow and no manual enrollment on the device. It's a schema-versioned document (`v: 1`) carrying the user's work email, an organization token, and optional settings:
32-
33-
```json
34-
{
32+
The agent recognizes a user through a managed configuration delivered by IT. No browser flow and no manual enrollment on the device. It's a schema-versioned document (`v: 1`) carrying the user's work email, an organization token, and optional settings. It can be delivered through two channels, each with its own on-disk form:
33+
34+
<CodeWithTabs client:visible
35+
tabs={[
36+
{
37+
label: "Configuration Profile (plist)",
38+
language: "xml",
39+
code: `<?xml version="1.0" encoding="UTF-8"?>
40+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
41+
<plist version="1.0">
42+
<dict>
43+
<key>v</key><integer>1</integer>
44+
<key>email</key><string>jane.doe@example.com</string>
45+
<key>org_token</key><string>spk_org_…</string>
46+
<key>org_slug</key><string>example-corp</string>
47+
</dict>
48+
</plist>`,
49+
},
50+
{
51+
label: "Managed JSON",
52+
language: "json",
53+
code: `{
3554
"v": 1,
3655
"email": "jane.doe@example.com",
3756
"org_token": "spk_org_…",
3857
"org_slug": "example-corp"
39-
}
40-
```
41-
42-
It can be delivered through two channels:
58+
}`,
59+
},
60+
]}
61+
/>
4362

4463
- **Configuration Profile (macOS, preferred)**: a Custom Settings payload (`com.apple.ManagedClient.preferences`) targeting the preferences domain **`com.speakeasy.agent`**, materialized by the OS at `/Library/Managed Preferences/com.speakeasy.agent.plist`. Declarative, MDM-native, no standing script, and users cannot edit it without removing the profile. When a device has both a profile and the JSON file, the profile wins per field.
4564
- **Script-dropped `managed.json` (works everywhere)**: a script or package payload writes the JSON file to a fixed system path:
@@ -50,18 +69,19 @@ It can be delivered through two channels:
5069
| Linux | `/etc/speakeasy/managed.json` |
5170
| Windows | `%ProgramData%\Speakeasy\managed.json` |
5271

53-
Two constraints catch most first deployments, regardless of MDM:
54-
55-
- **The configuration must be readable by the logged-in user**, not just root. The agent runs as that user. For the JSON file use `0644 root:wheel` (or `0640` with the user's group); `0600` silently breaks enrollment. Profiles have no permission trap. The OS owns the plist.
56-
- **The agent reads its configuration at daemon startup.** Any policy that writes the file must restart the daemon afterwards, on every run. A rotated token sits inert on disk until the next restart. The same restart rule applies to profile updates. On a pkg-installed macOS device, restart the console user's LaunchAgent (`launchctl kickstart -k "gui/$(id -u)/com.speakeasy.daemon"`), substituting the console user's uid when run from a root MDM policy. Linux and Windows service installs still use `speakeasyd -service restart`.
72+
The configuration must be readable by the logged-in user, not just root: the agent runs as that user. For the JSON file use `0644 root:wheel` (or `0640` with the user's group); `0600` silently breaks enrollment. Profiles have no permission trap. The OS owns the plist.
5773

5874
<Callout type="warning">
5975
The `org_token` is a credential, but the device cannot keep it secret from its own user: the agent runs as the logged-in user, who can therefore read the configuration. Treat the token as a revocable, organization-scoped credential: scope its permissions on that assumption and rotate it rather than trying to hide it. Pass it into your MDM as a script parameter or templated variable, never as a literal in a script body.
6076
</Callout>
6177

6278
### Verify on the device
6379

64-
After the policy has run and the daemon restarted, `speakeasy status` on a target device should report the enrolled email with `source: managed` (surfaced in the menu bar UI as "Provisioned by IT"). If it reports `source: local` or `source: none`, the usual causes are, in order: the daemon hasn't restarted since the configuration changed, the file permissions are too tight, or the file is at the wrong path.
80+
`speakeasy status` on a target device should report the enrolled email with `source: managed` (surfaced in the menu bar UI as "Provisioned by IT"). If it reports `source: local` or `source: none`, the usual causes are the file permissions being too tight, the file sitting at the wrong path, or the daemon not having restarted since the configuration was written (see [Updating the managed configuration](#updating-the-managed-configuration) below).
81+
82+
### Updating the managed configuration
83+
84+
The agent reads its configuration at daemon startup, not continuously, so a change to the file or profile doesn't take effect until the daemon restarts. Any policy that writes the file must restart the daemon afterwards, on every run: a rotated token sits inert on disk until the next restart. The same restart rule applies to profile updates. On a pkg-installed macOS device, restart the console user's LaunchAgent (`launchctl kickstart -k "gui/$(id -u)/com.speakeasy.daemon"`), substituting the console user's uid when run from a root MDM policy. Linux and Windows service installs still use `speakeasyd -service restart`.
6585

6686
## Verify the rollout with agent coverage
6787

0 commit comments

Comments
 (0)