MacOS: Remove deprecated OneDrive "Open at login" setting; add script-based replacement#231
Open
royklo wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The OneDrive
OpenAtLoginmanaged preference is deprecated and has been a no-op since sync app 24.113, so the "Open at login" setting inMacOS - 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/createloginitemfire-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
IntuneManagementandNativeImportexportssettingCount15 → 14New
MACOS/Scriptsfolder (mirroringWINDOWS/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.mddocumenting purpose and deployment settings (suggested policy nameMacOS - OIB - Microsoft OneDrive - U - Open at Login - v1.1, assign to users, run as signed-in user, hide notifications, every 15 minutes, 3 retries)MacOS - OIB - Microsoft OneDrive - D - Service and Access: the script enables the login item, the policy keeps it allowed and locked onDocumentation
MACOS/CHANGELOG.md: new v1.1 section documenting the removal and the new scriptMACOS/SETTINGSOUTPUT.md: removed the "Open at login" row and updated the policy name references to v1.1Validation
./Scripts/Update-OIBManifest.ps1 -Mode Validate -Platform Allpasses locally