Skip to main content

entra roledefinition remove

Removes a custom Microsoft Entra role definition

Usage

m365 entra roledefinition remove [options]

Options

-i, --id [id]

The id of the role definition. Specify either id or displayName, but not both.

-n, --displayName [displayName]

The name of the role definition. Specify either id or displayName, but not both.

-f, --force

Don't prompt for confirmation.

-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

info

When the role definition is removed, all the associated role assignments are deleted.

Examples

Remove a role definition specified by id without prompting

m365 entra roledefinition remove --id 0bed8b86-5026-4a93-ac7d-56750cc099f1 --force

Remove a role definition specified by name and prompt for confirmation

m365 entra roledefinition remove --displayName 'Custom Role'

Response

The command won't return a response on success

CTRL + M