Skip to main content

search externalconnection remove

Allow the administrator to remove a specific external connection used in Microsoft Search.


m365 search externalconnection remove [options]


-i, --id [id]

ID of the External Connection to remove. Specify either id or name

-n, --name [name]

Name of the External Connection to remove. Specify either id or name

-f, --force

Don't prompt for confirming removing the connection

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is options.

--query [query]

JMESPath query string. See for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.


Runs command with verbose logging.


Runs command with debug logging.


If the command finds multiple external connections used in Microsoft Search with the specified name, it will prompt you to disambiguate which external connection it should remove, listing the discovered IDs.


Removes external connection with id MyApp

m365 search externalconnection remove --id "MyApp"

Removes external connection with name Test. Will NOT prompt for confirmation before removing.

m365 search externalconnection remove --name "Test" --force


The command won't return a response on success.