cli-microsoft365 icon indicating copy to clipboard operation
cli-microsoft365 copied to clipboard

New command: `m365 entra multitenant remove`

Open MartinM85 opened this issue 1 year ago • 5 comments

Usage

m365 entra multitenant remove [options]

Description

Removes a multitenant organization

Options

Option Description
-f, --force Don't prompt for confirmation.

Examples

Remove the multitenant organization

m365 entra multitenant remove

Remove the multitenant organization without prompting for confirmation

m365 entra multitenant remove --force

Default properties

No response

Additional Info

Multitenant organization is a brand new feature in Microsoft Entra ID

https://learn.microsoft.com/en-us/entra/identity/multi-tenant-organizations/overview

The signed-in user must be assigned at least the Security Administrator role. It requires new permission MultiTenantOrganization.ReadWrite.All

Only an active owner tenant can remove the entire multitenant organization. It will also remove all member tenants.

I will work on it.

MartinM85 avatar Apr 30 '24 11:04 MartinM85

the naming is set so let's start reviewing the spec 👍

Adam-it avatar May 04 '24 22:05 Adam-it

@MartinM85, which endpoint would you call to achieve this? Just had a quick look through the docs and didn't find anything regarding the reset of a multitenant organization structure, so I'm curious about your approach.

Jwaegebaert avatar May 06 '24 06:05 Jwaegebaert

@Jwaegebaert I will use this.

entra multitenant remove will remove all joined tenants and the owner tenant will be removed as the last one which will trigger deletion of the entire multitenant organization (already tested on my side). I will add a remark to the doc that all joined tenants will be removed.

An active owner tenant can remove itself as long as there is no other active tenant remaining, thereby deleting the entire multitenant organization.

MartinM85 avatar May 06 '24 07:05 MartinM85

All right, good to know. Before we continue, we'll also need to add the --force option to this command as it's a remove command. But besides that, it should be good to go.

Jwaegebaert avatar May 06 '24 09:05 Jwaegebaert

@Jwaegebaert Spec updated.

MartinM85 avatar May 06 '24 09:05 MartinM85