Skip to content

MacOS: Remove deprecated OneDrive "Open at login" setting; add script-based replacement#231

Open
royklo wants to merge 1 commit into
SkipToTheEndpoint:mainfrom
royklo:fix/macos-onedrive-open-at-login
Open

MacOS: Remove deprecated OneDrive "Open at login" setting; add script-based replacement#231
royklo wants to merge 1 commit into
SkipToTheEndpoint:mainfrom
royklo:fix/macos-onedrive-open-at-login

Conversation

@royklo

@royklo royklo commented Jul 15, 2026

Copy link
Copy Markdown

Summary

The OneDrive OpenAtLogin managed preference is deprecated and has been a no-op since sync app 24.113, so the "Open at login" setting in MacOS - OIB - Microsoft OneDrive - U - Known Folder Move (added in the v1.0 release) has been silently doing nothing. A Managed Login Items payload can't replace it either: per Apple, Managed Login Items only allow/lock a login item, they never enable one. The only supported mechanism is OneDrive's own /createloginitem fire-and-exit command (OneDrive 26.027+), which must run as the signed-in user.

The same issue I recently fixed in microsoft/intune-my-macs (microsoft/intune-my-macs#39); this PR ports that fix to the OIB.

Changes

MacOS - OIB - Microsoft OneDrive - U - Known Folder Move → bumped to v1.1

  • Removed the deprecated "Open at login" setting from both the IntuneManagement and NativeImport exports
  • Setting IDs renumbered to stay contiguous, settingCount 15 → 14
  • File encodings preserved (UTF-16 LE for the IntuneManagement export, UTF-8 BOM/CRLF for NativeImport)

New MACOS/Scripts folder (mirroring WINDOWS/Scripts, first macOS script in the repo)

  • Enable-OneDriveOpenAtLogin.zsh: user-context script that enables the OneDrive login item via /createloginitem. Guarded and idempotent: no-ops until OneDrive ≥ 26.027 is installed, performs the enable exactly once, then a per-user marker keeps every later run a no-op so the 15-minute cadence never re-launches OneDrive. Adapted from the MIT-licensed script in the intune-my-macs PR above (attribution in the header).
  • README.md documenting purpose and deployment settings (suggested policy name MacOS - OIB - Microsoft OneDrive - U - Open at Login - v1.1, assign to users, run as signed-in user, hide notifications, every 15 minutes, 3 retries)
  • Works together with the Managed Login Items in MacOS - OIB - Microsoft OneDrive - D - Service and Access: the script enables the login item, the policy keeps it allowed and locked on

Documentation

  • MACOS/CHANGELOG.md: new v1.1 section documenting the removal and the new script
  • MACOS/SETTINGSOUTPUT.md: removed the "Open at login" row and updated the policy name references to v1.1

Validation

The OpenAtLogin managed preference is deprecated and a no-op since
OneDrive sync app 24.113, so the KFM policy was silently doing nothing
for this setting. Managed Login Items can only allow/lock a login item,
not enable it - the only supported mechanism is OneDrive's own
/createloginitem command (26.027+), which must run as the signed-in user.

- Remove "Open at login" from MacOS - OIB - Microsoft OneDrive - U -
  Known Folder Move (both IntuneManagement and NativeImport exports),
  renumber setting IDs, bump policy to v1.1
- Add MACOS/Scripts/Enable-OneDriveOpenAtLogin.zsh: idempotent
  user-context script that enables the login item once via
  /createloginitem (adapted from microsoft/intune-my-macs#39)
- Update MACOS/CHANGELOG.md and SETTINGSOUTPUT.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant