How to force uninstall local (unpacked) extensions from Microsoft Edge

Plamen Trifonov 20 Reputation points
2024-11-04T10:42:56.5833333+00:00

Is it possible to use admin policies on edge/windows (or any other method) to remove all locally installed extensions?

We developed an internal browser extension for our company that employees would install from developer mode -> load unpacked.

It was a mess when we had to push an update, sending new files and asking staff to follow the installation steps.

So we managed to self-host the extension on our own servers and force installed it to all managed devices by using group policies.

The problem is that old version of the extension still persist on the devices. How can we remove all old version of the extension, those that were installed locally from developer mode -> load unpacked?

We disabled the policy ExtensionDeveloperModeSettings but it only prevents users from installing new local extension it didn't remove the existing ones.

We thought about using the ExtensionInstallBlocklist policy but that requires an extension ID. Every time you install a local extension it generates a new extension ID, even if you have specified a "key" in the manifest.json file, so we don't have a list of IDs to block.

The name of the extension is consistent but I couldn't find a way to use group policies to remove extensions by name.

We even tried the built-in extensions API:

chrome.management.getAll(extensions => {
	for (const extension of extensions) {
		if (extension.installType === "development") {
			chrome.management.uninstall(extension.id);
		}
	}
});

However, this doesn't automatically remove it, it prompts the user with a popup dialog and they have to click the button to uninstall the extension. This relies on the user action, so it's not a guaranteed.

Any suggestions would be appreciated.

Microsoft Edge | Microsoft Edge development
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2024-11-05T02:43:27.0833333+00:00

    Hi @Plamen Trifonov,

    You only need 2 policies for this:

    1. ExtensionSettings --- Remove all unpacked extensions (preventing web extensions from being removed). The policy value: { "*": {"installation_mode": "removed" }, "update_url:https://clients2.google.com/service/update2/crx":{"installation_mode":"allowed"}, "update_url:https://edge.microsoft.com/extensionwebstorebase/v1/crx":{"installation_mode":"allowed"}}
    2. ExtensionInstallForcelist --- Specify which extension should be forcibly installed (and should not be removed by ExtensionSettings)

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards,

    Shijie Li

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.