Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 33 additions & 18 deletions docs/docs/cmd/entra/app/app-remove.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,52 @@ import Global from '/docs/cmd/_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# entra app remove
# entra app role remove

Removes an Entra app registration
Removes role from the specified Entra app registration

## Usage

```sh
m365 entra app remove [options]
m365 entra app role remove [options]
```

## Alias

```sh
m365 entra appregistration remove [options]
m365 entra appregistration role remove [options]
```

## Options

```md definition-list
`--appId [appId]`
: Application (client) ID of the Entra application registration to remove. Specify either `appId`, `objectId` or `name` but not multiple.
: Application (client) ID of the Entra application registration from which role should be removed. Specify either `appId`, `appObjectId` or `appName`

`--objectId [objectId]`
: Object ID of the Entra application registration to remove. Specify either `appId`, `objectId` or `name` but not multiple.
`--appObjectId [appObjectId]`
: Object ID of the Entra application registration from which role should be removed. Specify either `appId`, `appObjectId` or `appName`

`--name [name]`
: Name of the Entra application registration to remove. Specify either `appId`, `objectId` or `name` but not multiple.
`--appName [appName]`
: Name of the Entra application registration from which role should be removed. Specify either `appId`, `appObjectId` or `appName`

`-n, --name [name]`
: Name of the role to remove. Specify either `name`, `id` or `claim`

`-i, --id [id]`
: Id of the role to remove. Specify either `name`, `id` or `claim`

`-c, --claim [claim]`
: Claim value of the role to remove. Specify either `name`, `id` or `claim`

`-f, --force`
: Don't prompt for confirmation to remove the app.
: Don't prompt for confirmation to remove the role.
```

<Global />

## Remarks

For best performance use the `objectId` option to reference the Entra application registration to remove. If you use `appId` or `name`, this command will first need to find the corresponding object ID for that application.
For best performance use the `appObjectId` option to reference the Entra application registration from which to remove the role. If you use `appId` or `appName`, this command will first need to find the corresponding object ID for that application.

If the command finds multiple Entra application registrations with the specified app name, it will prompt you to disambiguate which app it should use, listing the discovered object IDs.

Expand All @@ -62,24 +71,30 @@ If the command finds multiple Entra application registrations with the specified

## Examples

Remove the Entra application registration by its app (client) ID.
Remove role from a Entra application registration using object ID and role name options. Will prompt for confirmation before deleting the role.

```sh
m365 entra app role remove --appObjectId d75be2e1-0204-4f95-857d-51a37cf40be8 --name "Get Product"
```

Remove role from a Entra application registration using app (client) ID and role claim options. Will prompt for confirmation before deleting the role.

```sh
m365 entra app remove --appId d75be2e1-0204-4f95-857d-51a37cf40be8
m365 entra app role remove --appId e75be2e1-0204-4f95-857d-51a37cf40be8 --claim "Product.Get"
```

Remove the Entra application registration by its object ID.
Remove role from a Entra application registration using app name and role claim options. Will prompt for confirmation before deleting the role.

```sh
m365 entra app remove --objectId d75be2e1-0204-4f95-857d-51a37cf40be8
m365 entra app role remove --appName "My app" --claim "Product.Get"
```

Remove the Entra application registration by its name. Will NOT prompt for confirmation before deleting.
Remove role from a Entra application registration using object ID and role id options. Will NOT prompt for confirmation before deleting the role.

```sh
m365 entra app remove --name "My app" --force
m365 entra app role remove --appObjectId d75be2e1-0204-4f95-857d-51a37cf40be8 --id 15927ce6-1933-4b2f-b029-4dee3d53f4dd --force
```

## Response

The command won't return a response on success.
The command won't return a response on success.
21 changes: 21 additions & 0 deletions docs/docs/cmd/entra/app/app-role-add.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Global from '/docs/cmd/_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# entra app role add

Expand Down Expand Up @@ -49,6 +51,25 @@ For best performance use the `appObjectId` option to reference the Entra applica

If the command finds multiple Entra application registrations with the specified app name, it will prompt you to disambiguate which app it should use, listing the discovered object IDs.

## Permissions

<Tabs>
<TabItem value="Delegated">

| Resource | Permissions |
| --------------- | --------------------------- |
| Microsoft Graph | Application.ReadWrite.All |

</TabItem>
<TabItem value="Application">

| Resource | Permissions |
| --------------- | ------------------------------- |
| Microsoft Graph | Application.ReadWrite.OwnedBy |

</TabItem>
</Tabs>

## Examples

Add role to the Entra application registration specified by its object ID
Expand Down
21 changes: 20 additions & 1 deletion docs/docs/cmd/entra/app/app-role-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,25 @@ For best performance use the `appObjectId` option to reference the Entra applica

If the command finds multiple Entra application registrations with the specified app name, it will prompt you to disambiguate which app it should use, listing the discovered object IDs.

## Permissions

<Tabs>
<TabItem value="Delegated">

| Resource | Permissions |
| --------------- | --------------------- |
| Microsoft Graph | Application.Read.All |

</TabItem>
<TabItem value="Application">

| Resource | Permissions |
| --------------- | --------------------- |
| Microsoft Graph | Application.Read.All |

</TabItem>
</Tabs>

## Examples

Get roles for the Entra application registration specified by its object ID
Expand Down Expand Up @@ -118,4 +137,4 @@ m365 entra app role list --appName "My app"
```

</TabItem>
</Tabs>
</Tabs>