Block Internet Macros for Office Applications using Intune Group Policy

Let’s learn how to Block Internet Macros for Office Applications using Intune Settings Catalog or Group Policy. Microsoft made changes in the default behavior of Internet Macros for Office Applications. In February 2022, Microsoft announced that they block internet macros by default for office applications.

They reverted the changes on the 8th of July 2022, and the default behavior was changed back to allow internet macros. There would be some scenarios where organizations want to block the internet macros for Microsoft 365 apps.

You can use Intune Settings Catalog or Group Policy to block the internet macro download for Microsoft office applications on Windows 11 or Windows 10 devices. This will block macros from running in Office files from the Internet.

Update 22nd July 2022 -> Microsoft is again planning to roll out the Macro settings disable change as the default option starting from 27th July 2022.

Patch My PC

Block Internet Macros for Office Applications

Let’s check end-user experience and workflow when Block Internet Macros for Office Applications policy is implemented. The Office app Trust bar shows the following error when blocking internet macros via Cloud policy or via default settings implemented for all the users.

When a user tries to run the macro on a Windows device, it will give the following error message because the macro source is untrusted. The new box (#7) shown in the diagram below is not the default behavior anymore.

⚠️SECURITY RISK Microsoft has blocked macros from running because the source of this file is untrusted.

  • This post will cover scenario 5aMicros blocked using policy.

Microsoft confirmed in the Techcommunity article that “We’re resuming the rollout of this change in the Current Channel. Based on our review of customer feedback, we’ve made updates to both our end user and our IT admin documentation to make clearer what options you have for different scenarios.”

Adaptiva
Block Internet Macros for Office Applications using Intune Group Policy 0
Block Internet Macros for Office Applications using Intune Group Policy 0 – Creds to Microsoft

Confirm the Macro Policy is Set or not

You can use the following method to confirm whether the Office 365 macro policies set on Windows devices or not. The policy was set to Disabled or Not Configured, then the app would check the settings under:

  1. File > Options >
  2. Trust Center > Trust Center Settings…
  3. Macro Settings.

The default is set to “Disable all macros with notification,” which allows users to enable content in the Trust Bar.

Create Intune Cloud Policy to Block Macros from Internet

Let’s create an Intune Cloud Policy to Block Macros from the Internet. You can use Intune cloud policy or Group Policy ADMX template to block the macros running from non-trusted locations such as the internet.

The following steps help you turn on macro blocking for office applications.

  • Sign in to the Endpoint Manager Intune portal
  • Select Devices > Windows > Configuration profiles > Create profile
Block Internet Macros for Office Applications using Intune Group Policy 01
Block Internet Macros for Office Applications using Intune Group Policy 01

In Create Profile, Select Platform, Windows 10, and later and Profile, Select Profile Type as Settings catalog.

  • Click on Create button.
Block Internet Macros for Office Applications using Intune Group Policy 02
Block Internet Macros for Office Applications using Intune Group Policy 02

On the Basics tab, enter a descriptive Name, such as Block Internet Macros for Office Applications.

  • Optionally, enter a Description for the policy – Block macros from running in Office files from the Internet.
  • Select Next to continue.
Block Internet Macros for Office Applications using Intune Group Policy 04
Block Internet Macros for Office Applications using Intune Group Policy 04

In Configuration settings, click Add settings to browse or search the catalog for the settings you want to configure. In this case, to block internet macros from running on office apps.

Block Internet Macros for Office Applications using Intune Group Policy 04
Block Internet Macros for Office Applications using Intune Group Policy 04

On the Settings Picker windows, use the search box and type macros from running in Office files from the Internet, and click Search.

  • Block macros from running in Office files from the Internet (User)

Use commas “,” among search terms to lookup settings by their keywords “macros from running in Office files from the Internet.”. The Browse by category – 1 results in the “Trust Center” subcategory – Setting name.

Block Internet Macros for Office Applications using Intune Group Policy 1
Block Internet Macros for Office Applications using Intune Group Policy 1

This policy setting allows you to block macros from running in Office files from the Internet. If you enable this policy setting, macros are blocked from running, even if “Enable all macros” is selected in the Macro Settings section of the Trust Center.

The disable macro policy is available for 5 office applications such as Access, Excel, PowerPoint, Visio, and Word.

You can use the settings called “Block macros from running in Office files from the Internet (User)” to change the default behavior of the Office application towards enabling the Macros received from the internet.

  • Microsoft Access 2016 – Application Settings > Security > Trust Center – 11 of 12 settings in this subcategory are not configured.
  • Microsoft Excel 2016 – Excel Options > Security > Trust Center – 15 of 16 settings in this subcategory are not configured.
  • Microsoft PowerPoint 2016 – PowerPoint Options > Security > Trust Center – 13 of 14 settings in this subcategory are not configured.
  • Microsoft Visio 2016 – Visio Options > Security > Trust Center – 114 of 115 settings in this subcategory are not configured.
  • Microsoft Word 2016 – Word Options > Security > Trust Center – 18 of 19 settings in this subcategory are not configured.

Also, instead of having the choice to “Enable Content,” users will receive a notification that macros are blocked from running. Macros will be allowed to run if the Office file is saved to a trusted location or was previously trusted by the user.

If you disable or don’t configure this policy setting, the settings configured in the Macro Settings section of the Trust Center determine whether macros run in Office files that come from the Internet.

  • Use the slider (move to the right) to enable the block policy for running the macros from office files, as shown in the below screenshot.
  • Follow the same steps for all 5 applications.
  • Click on Next.
Block Internet Macros for Office Applications using Intune Group Policy 2
Block Internet Macros for Office Applications using Intune Group Policy 2

Under Assignments, In Included groups, click Add groups and then choose Select groups to include one or more groups.

  • Click Next to continue.
Block Internet Macros for Office Applications using Intune Group Policy 05
Block Internet Macros for Office Applications using Intune Group Policy 05

On the Scope tags page, you can assign a security tag to filter the profile to specific IT groups. Add scope tags (if required).

  • Click Next to go to the next page.
  • In Review + create, review your settings.
  • When you select Create, your changes are saved, and the profile is assigned.
Block Internet Macros for Office Applications using Intune Group Policy 06
Block Internet Macros for Office Applications using Intune Group Policy 06

Group Policy Settings to Block Internet Macros for Office Applications

Let’s check Group Policy Settings to Block Internet Macros for Office Applications. Office 365 or 2019 ADMX templates are not available as part of Windows 10, Windows 11, and Server 2022 default ADMX templates. You have to download the Office ADMX template and install it on the Domain Controller.

Read More -> How to Download and Install ADMX templates – Download Microsoft Edge ADMX Group Policy Templates

Block Internet Macros for Office Applications using Intune Group Policy 11
Block Internet Macros for Office Applications using Intune Group Policy 11

Once the ADMX template for Office is installed and configured, you would be able to see new ADMX folders for Office applications. The following table shows where each policy can be found:

  • Group Policy Management Console under User Configuration\Policies\Administrative Templates:
ApplicationPolicy location
AccessMicrosoft Access 2016\Application Settings\Security\Trust Center
ExcelMicrosoft Excel 2016\Excel Options\Security\Trust Center
PowerPointMicrosoft PowerPoint 2016\PowerPoint Options\Security\Trust Center
VisioMicrosoft Visio 2016\Visio Options\Security\Trust Center
WordMicrosoft Word 2016\Word Options\Security\Trust Center
Block Internet Macros for Office Applications using Intune Group Policy 111
    This policy setting allows you to block macros from running in Office files that come from the internet.

    If you enable this policy setting, macros are blocked from running, even if "Enable all macros" is selected in the Macro Settings section of the Trust Center. Users will receive a notification that macros are blocked from running.

    The exceptions when macros will be allowed to run are:
    - The Office file is saved to a Trusted Location.
    - The Office file was previously trusted by the user.
    - Macros are digitally signed and the matching Trusted Publisher certificate is installed on the device.

    If you disable this policy setting, the settings configured in the Macro Settings section of the Trust Center determine whether macros run in Office files that come from the internet.

    If you don’t configure this policy setting, macros will be blocked from running. Users will receive a notification telling them of the security risks of macros from the internet along with a link to learn more.
Block Internet Macros for Office Applications using Intune Group Policy 12
Block Internet Macros for Office Applications using Intune Group Policy 12

Disable Macro – Troubleshoot Intune Policy Deployment

Let’s see how to Disable Macro – Troubleshoot Intune Policy Deployment. The first thing is to look at the Intune reports to understand the trend and whether the deployment is going well.

You can check Intune settings catalog profile report from Intune Portal, which provides an overall view of device configuration policies and deployment status. The next step is to look into the event logs and confirm whether the policy is applied or not.

Event Log path for Intune logs – > Applications and Services -> Microsoft->Windows->DeviceManagement-Enterprise-Diagnostics-Provider->Admin

You can check for the event log ID 814 (policy is successfully applied) and confirm whether the policy string to block macro is in the event log L_BlockMacroExecutionFromInternet. This is a user-based policy; hence you would be able to see the Current User and user’s SID details.

MDM PolicyManager: Set policy string, Policy: (L_BlockMacroExecutionFromInternet), Area: (word16v2~Policy~L_MicrosoftOfficeWord~L_WordOptions~L_Security~L_TrustCenter), EnrollmentID requesting merge: (B4E48680-C0A3-44F3-8D0E-0691407CAAA4), Current User: (S-1-5-21-2901188661-3025291148-348095268-1124), String: (<enabled/>), Enrollment Type: (0x6), Scope: (0x1).
MDM PolicyManager: Set policy string, Policy: (L_BlockMacroExecutionFromInternet), Area: (visio16v2~Policy~L_MicrosoftVisio~L_VisioOptions~L_Security~L_TrustCenter), EnrollmentID requesting merge: (B4E48680-C0A3-44F3-8D0E-0691407CAAA4), Current User: (S-1-5-21-2901188661-3025291148-348095268-1124), String: (<enabled/>), Enrollment Type: (0x6), Scope: (0x1).
Block Internet Macros for Office Applications using Intune Group Policy 07
Block Internet Macros for Office Applications using Intune Group Policy 07

The registry is the next place you can check to confirm whether the registry entries are already created and applied or not.

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\providers\B4E48680-C0A3-44F3-8D0E-0691407CAAA4\default\S-1-5-21-2901188661-3025291148-348095268-1124\visio16v2~Policy~L_MicrosoftVisio~L_VisioOptions~L_Security~L_TrustCenter

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\providers\B4E48680-C0A3-44F3-8D0E-0691407CAAA4\default\S-1-5-21-2901188661-3025291148-348095268-1124\visio16v2~Policy~L_MicrosoftVisio~L_VisioOptions~L_Security~L_TrustCenter]
"L_BlockMacroExecutionFromInternet"="<enabled/>"
"L_BlockMacroExecutionFromInternet_LastWrite"=dword:00000001
Block Internet Macros for Office Applications using Intune Group Policy 08
Block Internet Macros for Office Applications using Intune Group Policy 08

Results

The report reflects the successful deployment of the block internet Macros for Office application policy to Windows 11 devices.

Block Internet Macros for Office Applications using Intune Group Policy 09
Block Internet Macros for Office Applications using Intune Group Policy 09

Author

Anoop C Nair is Microsoft MVP! He is a Device Management Admin with more than 20 years of experience (calculation done in 2021) in IT. He is Blogger, Speaker, and Local User Group HTMD Community leader. His main focus is on Device Management technologies like SCCM 2012, Current Branch, and Intune. He writes about ConfigMgr, Windows 11, Windows 10, Azure AD, Microsoft Intune, Windows 365, AVD, etc.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.