Teams docs

Deploy with your MDM

One configuration profile carries your license key, settings, and policies. Build it in the dashboard, upload it to your MDM, and scope it to the Macs running Midnight Oil.

1. Install Midnight Oil on your Macs

Deploy the app the way you deploy other apps: the DMG from GitHub Releases, or brew install --cask coreyhaines31/tap/midnightoil. It's signed and notarized by Apple and updates itself. To push updates yourself instead, add SUEnableAutomaticChecks set to false to the profile (the standard key for apps that update with Sparkle).

2. Build the profile

Sign in to the Teams dashboard and open Deploy. Choose:

  • Fleet reporting, if you want Macs on the Fleet page, and a Mac name using your MDM's device-name variable so each Mac reports its own name. Check your MDM's docs for the variable; Midnight Oil sends exactly what the profile says.
  • Policies: turn off closed-lid mode, cap the length of sessions people start, set a battery floor.
  • Settings to lock on or off, or leave to each person.
  • An optional session webhook URL and its signing secret (required except for Slack).

Download the profile. It's a standard .mobileconfig with your license key inside, so treat it like a credential and keep it in your MDM.

3. Upload it to your MDM

Jamf Pro

Computers › Configuration Profiles › Upload. Scope it to the Macs (or a smart group of Macs with Midnight Oil installed). For the Mac name, use $COMPUTERNAME.

Kandji

Library › Add new › Custom Profile, upload the file, and assign it to a Blueprint. For the Mac name, use $DEVICE_NAME.

Microsoft Intune

Devices › macOS › Configuration › Create › Templates › Custom, upload the file, and assign it. Use the Device channel. For the Mac name, use the device-name variable from Intune's docs, or leave it empty.

Mosyle, Addigy, JumpCloud, and others

Add a custom configuration profile, upload the file, and assign it to the Macs. Use your MDM's device-name variable for the Mac name.

A few Macs, no MDM

Double-click the profile on each Mac, then approve it in System Settings › General › Device Management. Installing needs an administrator.

4. Check a Mac

In Midnight Oil, open Settings › General. The Midnight Oil for Teams section shows your organization, seats, and policies, and says the license was deployed by your organization. Locked settings are dimmed with a note at the top of their pane. If fleet reporting is on, the Mac appears on the Fleet page within a minute.

Updating the profile

Build a new profile and upload it in place of the old one. Profiles from your dashboard share an identifier, so the new one replaces the old on each Mac. Renewed keys reach reporting Macs automatically; redeploy the profile so the rest get them too.

Every managed key

For MDMs that prefer key-value settings over an uploaded profile, these are the preferences for the domain app.midnightoil.MidnightOil:

  • teamsLicenseKey (string): your license key.
  • fleetReporting (boolean): report to the fleet dashboard.
  • deviceLabel (string): the Mac's name on the Fleet page and in webhooks.
  • webhookURL, webhookSecret (string): the session webhook.
  • policyDisallowClosedLid (boolean), policyMaxSessionHours (integer, 1–168), policyMinimumBatteryFloor (integer, 1–99).
  • Any setting, such as allowsDisplaySleep, startsSessionAtLaunch, endsWhenUnplugged, staysAwakeWithLidClosed, batteryFloorEnabled, batteryFloorPercent, triggersEnabled, driveAliveEnabled.