Skip to main content
Solved

Disable MS Office 2021 login options

  • May 28, 2024
  • 7 replies
  • 304 views

Forum|alt.badge.img+5

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?view=o365-worldwide) 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?

Best answer by SamuelK

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. 


7 replies

RaxiaDK
Forum|alt.badge.img+10
  • Valued Contributor
  • 115 replies
  • May 28, 2024

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


RaxiaDK
Forum|alt.badge.img+10
  • Valued Contributor
  • 115 replies
  • May 28, 2024

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


RaxiaDK
Forum|alt.badge.img+10
  • Valued Contributor
  • 115 replies
  • May 28, 2024

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

Forum|alt.badge.img+5
  • Author
  • Contributor
  • 26 replies
  • May 28, 2024

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

easyedc
Forum|alt.badge.img+16
  • Esteemed Contributor
  • 631 replies
  • May 28, 2024

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.

 


Forum|alt.badge.img+5
  • Author
  • Contributor
  • 26 replies
  • May 29, 2024

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


Forum|alt.badge.img+2
  • New Contributor
  • 1 reply
  • Answer
  • June 13, 2024

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.