Skip to main content

external connection add

Add a new external connection


m365 external connection add [options]


m365 search externalconnection add


-i, --id <id>

Developer-provided unique ID of the connection within the Microsoft Entra tenant.

-n, --name <name>

The display name of the connection to be displayed in the Microsoft 365 admin center. Maximum length of 128 characters.

-d, --description <description>

Description of the connection displayed in the Microsoft 365 admin center.

--authorizedAppIds [authorizedAppIds]

Comma-separated collection of application IDs for registered Microsoft Entra apps that are allowed to manage the external connection and to index content in the external 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.


The id must be at least 3 and no more than 32 characters long. It can contain only alphanumeric characters, can't begin with Microsoft and can be any of the following values: None, Directory, Exchange, ExchangeArchive, LinkedIn, Mailbox, OneDriveBusiness, SharePoint, Teams, Yammer, Connectors, TaskFabric, PowerBI, Assistant, TopicEngine, MSFT_All_Connectors.


Adds a new external connection with name and description of test app.

m365 external connection add --id MyApp --name "Test" --description "Test"

Adds a new external connection with a limited number of authorized apps.

m365 external connection add --id MyApp --name "Test" --description "Test" --authorizedAppIds  "00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000001,00000000-0000-0000-0000-000000000002"


The command won't return a response on success.