Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

Outlook links do not open: "Your organization's policies are preventing us from completing this action"

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

A user clicks a link in an email in Outlook and nothing opens. Instead one of three messages appears, or none. Two of the messages blame a policy and one says something went wrong with the URL. They have different causes, and Microsoft documents them on two different pages, so the first job is to read which message the user sees.

Everything before the Fix section only reads information. The fixes change the registry or the list of trusted sites, and each has its warning and its way back.

What the error means

Microsoft's page "Hyperlinks are not working in Outlook" describes two situations.

The first is a browser registration problem. The page says: "Assume that you set Internet Explorer as your default browser in Windows. When you select a hyperlink in Microsoft Outlook, you receive one of the following error messages, depending on your Outlook version":

  • "This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator."
  • "Your organization's policies are preventing us from completing this action for you. For more info, please contact your help desk."

The second is a note at the head of the same page about the July 2023 security updates: "After you install the Outlook Desktop July 11th security updates, when you open a link in an email, if the path points to a Fully Qualified Domain Name (FQDN) or IP address, you may not be able to open the link or receive the following error message: Something unexpected went wrong with this URL". The page points to a Microsoft Support article, "Outlook blocks opening FQDN and IP address hyperlinks after installing protections for Microsoft Outlook Security Feature Bypass Vulnerability released July 11, 2023".

Neither of the two policy messages names a Group Policy setting, and the page does not tie them to one. The wording says policy, but Microsoft's page gives a registry association as the fix.

Likely causes

Message What Microsoft's pages tie it to Where it is documented
"Your organization's policies are preventing us from completing this action for you" or "This operation has been cancelled due to restrictions in effect on this computer" The default web browser registration. The fix imports the registry key HKEY_LOCAL_MACHINE\Software\Classes\htmlfile\shell\open\command from a working computer and checks that .html maps to htmlfile Hyperlinks are not working in Outlook
"Something unexpected went wrong with this URL", or a link that fails without a message A link whose path is an FQDN or IP address, after the July 11, 2023 Outlook security updates Hyperlinks page note and the Support article
A warning dialog when a link opens, rather than an error Expected behaviour after the same updates, per the Support article The Support article

The Support article says that for an FQDN or IP address path "you will see this dialog" and that "This is also expected", and that the warning can be disabled by following Microsoft's article on enabling or disabling hyperlink warning messages in Office programs. That is a change to a security warning, and its steps are not given here.

Microsoft's pages give no counts, so the rows are not ranked.

Prove the cause before changing anything

All of these read only.

  1. Note the exact message and the type of link. A link to a website with an ordinary name belongs to the first row. A link whose path is a file server name, a UNC share path, an FQDN or an IP address belongs to the second.
  2. Check whether the problem started after the July 11, 2023 Outlook security updates, or later. The Support article names the updates: KB5002427 for Outlook 2016 and KB5002432 for Outlook 2013.
  3. Compare the web-browser registration with a working computer. On both computers, in a command prompt, run:
reg query HKLM\Software\Classes\htmlfile\shell\open\command /ve

Microsoft's reg query page says /ve runs a query for value names that are empty, which is the key's (Default) value. A difference between the working and the failing computer fits the first row. The page does not say what the correct value is on your build, so compare against a computer where links work.

  1. Check the association the page names. The page's third step in Method 2 is to verify that the (Default) string value of HKEY_CLASSES_ROOT\.html is htmlfile. Read it with:
reg query HKCR\.html /ve
  1. For the second row, check the Trusted sites list. In Windows, search for Internet Options, open the Security tab and select Trusted sites, and see whether the link's server is listed. This only reads.

Example (illustrative): at a physiotherapy group in Canberra, a link to https://portal.example.com.au fails with the organization's policies message on one reception PC only. Other PCs open it. reg query on the failing PC shows a different (Default) value for the htmlfile open command than on a working PC. A separate link to a file share by IP address fails on every PC since the July update; that is the second row.

Fix

The two policy messages: restore the htmlfile open command

Risk: the steps below import a registry file into the problem computer and may edit the .html default value. Importing replaces the values of the htmlfile\shell\open\command key with the values from the other computer, and the page warns that the registry change can cause serious problems if done incorrectly. Close Outlook and any browser first. Our own advice, not the page's: use a file exported from a computer with the same Windows build and the same default browser.

Microsoft's first method, for Internet Explorer 6 to 11, is to reset Internet Explorer settings. The page tells readers on Windows 10, Windows 8.1 or Windows 8 to "proceed to method 2", so that method is not repeated here.

Method 2 is described as for "advanced computer users". The page warns: "Follow the steps in this section carefully. Serious problems might occur if you modify the registry incorrectly. Before you modify it, back up the registry for restoration in case problems occur." It says to use the method "only if the earlier instructions for each browser do not work".

On a computer that does not have the problem, export the key. This only reads and writes a file. From a command prompt, using the form on Microsoft's reg export page:

reg export HKLM\Software\Classes\htmlfile\shell\open\command <BackupFolder>\htmlfile-good.reg

On the problem computer, first save what is there. Export the same key under a different file name so the original can be put back:

reg export HKLM\Software\Classes\htmlfile\shell\open\command <BackupFolder>\htmlfile-before.reg

Then make the change. Copy htmlfile-good.reg to the problem computer and import it. Microsoft's page says to double-click the .reg file; Windows may then ask for confirmation before adding the information to the registry, and the page says to select Yes, then OK. The equivalent command, from the reg import page, is:

reg import <BackupFolder>\htmlfile-good.reg

Then verify the association. The page says to check that the (Default) string value of HKEY_CLASSES_ROOT\.html is htmlfile, and if not, to right-click (Default), select Modify, type htmlfile as the Value data and select OK. Treat that as a second change: read it first with the reg query HKCR\.html /ve command above.

To undo it: import the file saved before the change, which puts back the values the key held before the import and leaves the saved file in place:

reg import <BackupFolder>\htmlfile-before.reg

If you also changed the .html default value, set it back to what the query showed before. If the export of the problem computer reported that the key was not found, there is no saved file; the import then added the key, and removing it is done in Registry Editor. The reg import page does not describe removing values that the import added.

The FQDN or IP address link: add the server to Trusted sites

Risk: the steps below add a server to the Trusted sites zone. Links to that server then open without the block, and the zone is a security boundary: only add a path that you are sure is your own server or network. If the entry does not start with https:, the page says you must first clear the checkbox "Require server verification (https) for all sites in this zone", which lowers the check for every site in the zone, so write down that you changed it.

Microsoft's Support article gives the resolution: add the URLs to the Trusted Sites zone. Its warning comes first: "This workaround may make a computer or a network more vulnerable to attack by malicious users or by malicious software such as viruses. Make sure the FQDN or IP address you add to Trusted Sites is a valid URL path for your company or network."

First save the current state. Record the entries already in Trusted sites, with a screenshot of the dialog or a written list, and note whether the "Require server verification (https) for all sites in this zone" box is ticked. Microsoft's two Outlook articles give no registry location or command for the list, so none is given.

Then make the change. In Windows, search for Internet Options, select the Security tab, select Trusted Sites, and add the URL, UNC or FQDN path under "Add this website to the zone". The page's example is file://server.usa.corp.com.

To undo it: open the same dialog, select the entry and remove it, and tick "Require server verification (https) for all sites in this zone" again if you cleared it. Compare the list with the record you made before the change.

The page says the workaround can be deployed by Group Policy (User Configuration, Windows Components, Internet Explorer, Internet Control Panel, Security Page, Site to Zone Assignment List) and warns that the syntax for a file URL in the policy differs from the one typed into the dialog: the policy needs three forward slashes, for example file:///\\10.123.452.37, as the page prints it. Test an entry in the Internet Options dialog before putting it in a policy. A policy entry reaches every user in its scope, so apply it to a test group first and keep the policy's earlier state so you can set it back; this is our own advice.

Confirm the fix

  • The link opens in the browser or file viewer that the user expects, and the error does not appear.
  • For the htmlfile fix, reg query HKLM\Software\Classes\htmlfile\shell\open\command /ve now matches the working computer, and reg query HKCR\.html /ve shows htmlfile.
  • For the FQDN fix, the same link opens after Outlook is restarted, and a link to an address that was not added is still blocked.
  • A second user on a second computer with the same setup gets the same result.

What to watch afterwards

  • New Outlook updates. The FQDN behaviour started with a security update, so a later update is when a changed Trusted sites list matters again.
  • The set of servers added to Trusted sites. Each is a security decision; keep a list of what was added and why.
  • Computers that changed their default browser. The htmlfile registration is the thing the first fix repairs, so, as our own advice, check it again after a change of default browser.

Risks and limits

These steps have not been run or lab-tested.

The Microsoft Learn page covers classic Outlook on Windows and a registry method written for Windows 10 and earlier; it does not mention Windows 11. It does not say what the correct htmlfile open command is, and does not link the policy wording of the two messages to a Group Policy setting. The Support article's last update is December 11, 2023, and its advice lowers a protection that Microsoft added in a security update, so keep any additions narrow. Reg import of a file from another computer can bring in values that suit that computer only.

Sources