OneDrive StandAlone plist open at login Help

Valued Contributor II

I have found this info: MS Doc
I make the change via the GUI and I see the OpenatLogin change to a value of 1 from 0. I then copy this file out change it back to disable open at login and copy the plist. Seems to ignore this file and the openatlogin is still disabled.
How can I do this via JAMF to make sure OneDrive always open at login.

Read My Blog:

Contributor III

You could put it into the "Login Items" for the user.

That "Open At Login" doesn't always work.

Contributor III

Try something like this in Apple Script. (You'll need to put it in a shell script to execute from a Policy though)

tell application "System Events" to make login item with properties {name:"Microsoft Teams", path:"/Applications/Microsoft", hidden:false}

tell application "System Events" to delete login item "Microsoft Teams"