Disable MS Office 2021 login options

matthias_bretz
New Contributor III

Hi, I am trying to deploy Office 2021 (VolumeLicense) and with that I want do disable the ability for users to login to office and use their private Office 365 licenses.

On this site (https://learn.microsoft.com/de-de/microsoft-365/enterprise/network-requests-in-office-2016-for-mac?v...) I found three preferences witch to my understanding should just do that:

 

 

defaults write com.microsoft.Word UseOnlineContent -integer 0
defaults write com.microsoft.Excel UseOnlineContent -integer 0
defaults write com.microsoft.Powerpoint UseOnlineContent -integer 0

 

 

But they don't seem to work (not when deployed through Jamf or run locally).
Has anyone been handling this?

1 ACCEPTED SOLUTION

SamuelK
New Contributor

I have just tested the following: 

Refering from this Help Article (https://learn.microsoft.com/en-us/microsoft-365/troubleshoot/access-management/office-feature-disabl... 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. 


View solution in original post

7 REPLIES 7

RaxiaDK
Contributor II

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

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;
    ...
}

RaxiaDK
Contributor II

is com.microsoft.Powerpoint a user or system plist?

easyedc
Valued Contributor II

Have you looked at a configuration profile - From https://learn.microsoft.com/en-us/deployoffice/mac/preferences-outlook#allow-only-corporate-mailboxe...

 

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

SamuelK
New Contributor

I have just tested the following: 

Refering from this Help Article (https://learn.microsoft.com/en-us/microsoft-365/troubleshoot/access-management/office-feature-disabl... 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.