Then you push from jamf, you use root, you need to run it as administrator for the use
Like:
#!/bin/bash
currentuser=$(/bin/ls -la /dev/console | /usr/bin/cut -d ' ' -f 4)
su -l $currentuser -c "defaults write /Users/$currentuser/Library/Preferences/com.microsoft.Word UseOnlineContent -integer 0"
but you need your write to work first
is com.microsoft.Powerpoint a user or system plist?
Then you push from jamf, you use root, you need to run it as administrator for the use
Like:
#!/bin/bash
currentuser=$(/bin/ls -la /dev/console | /usr/bin/cut -d ' ' -f 4)
su -l $currentuser -c "defaults write /Users/$currentuser/Library/Preferences/com.microsoft.Word UseOnlineContent -integer 0"
but you need your write to work first
try
defaults read com.microsoft.Word
try
defaults read com.microsoft.Word
As I wrote, I tried it locally but Office ignores this setting or it is no longer valid:
defaults read com.microsoft.Word
{
AppExitGraceful = 1;
...
LoginKeychainEmpty = 1;
...
UseOnlineContent = 0;
...
}
Have you looked at a configuration profile - From https://learn.microsoft.com/en-us/deployoffice/mac/preferences-outlook#allow-only-corporate-mailboxes-to-be-added
Category Details
Domain com.microsoft.Outlook
Key AllowedEmailDomains
Data Type Array of Strings
Possible values Various (example: "contoso.com")
Requires Configuration Profile No
Availability 16.18
Comments Doesn't remove or disconnect accounts already added in Outlook.
Edit: testing with adding the key for our domain and trying to add a gmail account gets denied.
Have you looked at a configuration profile - From https://learn.microsoft.com/en-us/deployoffice/mac/preferences-outlook#allow-only-corporate-mailboxes-to-be-added
Category Details
Domain com.microsoft.Outlook
Key AllowedEmailDomains
Data Type Array of Strings
Possible values Various (example: "contoso.com")
Requires Configuration Profile No
Availability 16.18
Comments Doesn't remove or disconnect accounts already added in Outlook.
Edit: testing with adding the key for our domain and trying to add a gmail account gets denied.
Hi, yea but this is only for Outlook, right?
We don't even install Outlook. Only Word/Excel/PowerPoint
I have just tested the following:
Refering from this Help Article (https://learn.microsoft.com/en-us/microsoft-365/troubleshoot/access-management/office-feature-disabled#more-information under the Section "More Information" at the bottom).
The Article is for the Windows version of Office but worked just fine for me in my Mac. The Key you want to add to your defaults is called "SignInOptions". You can use the following values for this flag:
- 0 = Both IDs allowed (Microsoft Account & Organization Account)
- 1 = Microsoft Account only
- 2 = Org ID only
- 3 = Users can't sign in by using either ID (see the note below)
When I used this command
defaults write com.microsft.Word SignInOptions -integer 3
the app would only open a blank white window instead of the login screen.
It works the same for the other Applications I tested.
I hope that helps.