Skip to main content

entra enterpriseapp add

Creates an enterprise application (or service principal) for a registered Entra app

Usage

m365 entra enterpriseapp add [options]

Alias

m365 aad sp add [options]
m365 entra sp add [options]

Options

--appId [appId]

ID of the app for which the enterprise application should be created

--appName [appName]

Display name of the app for which the enterprise application should be created

--objectId [objectId]

ObjectId of the app for which the enterprise application should be created

-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 http://jmespath.org/ for more information and examples.

-o, --output [output]

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

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks

Specify either the appId, appName or objectId. If you specify more than one option value, the command will fail with an error.

If you register an application in the portal, an application object as well as an enterprise application object are automatically created in your home tenant. If you register an application using CLI for Microsoft 365 or the Microsoft Graph, you'll need to create the enterprise application separately. To register/create an application using the CLI for Microsoft 365, use the m365 entra app add command.

Examples

Creates an enterprise application for a registered Entra app with appId b2307a39-e878-458b-bc90-03bc578531d6.

m365 entra enterpriseapp add --appId b2307a39-e878-458b-bc90-03bc578531d6

Creates an enterprise application for a registered Entra app with appName Microsoft Graph.

m365 entra enterpriseapp add --appName "Microsoft Graph"

Creates an enterprise application for a registered Entra app with objectId b2307a39-e878-458b-bc90-03bc578531d6.

m365 entra enterpriseapp add --objectId b2307a39-e878-458b-bc90-03bc578531d6

Response

{
"id": "caeefa7c-1b4e-4257-8f1e-5dffd4e409e4",
"deletedDateTime": null,
"accountEnabled": true,
"alternativeNames": [],
"appDisplayName": "My Entra app",
"appDescription": null,
"appId": "a1023942-9f35-42a6-baf6-390f3a5f89c4",
"applicationTemplateId": null,
"appOwnerOrganizationId": "c2b2a0f7-fa44-4929-a994-757b7b998f01",
"appRoleAssignmentRequired": false,
"createdDateTime": null,
"description": null,
"disabledByMicrosoftStatus": null,
"displayName": "My Entra app",
"homepage": null,
"loginUrl": null,
"logoutUrl": null,
"notes": null,
"notificationEmailAddresses": [],
"preferredSingleSignOnMode": null,
"preferredTokenSigningKeyThumbprint": null,
"replyUrls": [],
"servicePrincipalNames": [
"a1023942-9f35-42a6-baf6-390f3a5f89c4"
],
"servicePrincipalType": "Application",
"signInAudience": "AzureADMyOrg",
"tags": [],
"tokenEncryptionKeyId": null,
"samlSingleSignOnSettings": null,
"addIns": [],
"appRoles": [],
"info": {
"logoUrl": null,
"marketingUrl": null,
"privacyStatementUrl": null,
"supportUrl": null,
"termsOfServiceUrl": null
},
"keyCredentials": [],
"oauth2PermissionScopes": [],
"passwordCredentials": [],
"resourceSpecificApplicationPermissions": [],
"verifiedPublisher": {
"displayName": null,
"verifiedPublisherId": null,
"addedDateTime": null
}
}

More information

CTRL + M