Skip to content

Conversation

NishkalankBezawada
Copy link
Contributor

Added minimal permissions for 'entra m365group recyclebin' commands

Added minimal permissions for 'entra m365group recyclebin' commands.

Screenshots

  • recyclebinitem list m365 entra m365group recyclebinitem list
image
  • recyclebinitem restore m365 entra m365group recyclebinitem restore --id 87casd23-4xxx-4as0-b23d-a1234561dbd8
image
  • recyclebinitem clear m365 entra m365group recyclebinitem clear
image
  • recyclebinitem remove m365 entra m365group recyclebinitem remove --id 87casd23-4xxx-4as0-b23d-a1234561dbd8
image

Closes #6941

Thanks,
Nish

@milanholemans
Copy link
Contributor

Thanks, we'll try to review it ASAP!

@MartinM85 MartinM85 self-assigned this Oct 17, 2025
Copy link
Contributor

@MartinM85 MartinM85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @NishkalankBezawada 🚀
I have a couple of small comments, nothing major.

Comment on lines +29 to +31
| Resource | Permissions |
|-----------------|-----------------------------|
| Microsoft Graph | Group.ReadWrite.All |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please improve formatting

Suggested change
| Resource | Permissions |
|-----------------|-----------------------------|
| Microsoft Graph | Group.ReadWrite.All |
| Resource | Permissions |
|-----------------|---------------------|
| Microsoft Graph | Group.ReadWrite.All |

Comment on lines +34 to +40
<TabItem value="Application">

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

</TabItem>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove the application permissions. I've checked the doc and the endpoint called by the command doesn't support application permissions.

Suggested change
<TabItem value="Application">
| Resource | Permissions |
|-----------------|-----------------------------|
| Microsoft Graph | Group.Read.All |
</TabItem>

Comment on lines +32 to +34
| Resource | Permissions |
|-----------------|-----------------------------|
| Microsoft Graph | Group.Read.All |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please improve formatting

Suggested change
| Resource | Permissions |
|-----------------|-----------------------------|
| Microsoft Graph | Group.Read.All |
| Resource | Permissions |
|-----------------|----------------|
| Microsoft Graph | Group.Read.All |

Comment on lines +39 to +41
| Resource | Permissions |
|-----------------|-----------------------------|
| Microsoft Graph | Group.Read.All |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please improve formatting

Suggested change
| Resource | Permissions |
|-----------------|-----------------------------|
| Microsoft Graph | Group.Read.All |
| Resource | Permissions |
|-----------------|----------------|
| Microsoft Graph | Group.Read.All |

Comment on lines +38 to +40
| Resource | Permissions |
|-----------------|-----------------------------|
| Microsoft Graph | Group.ReadWrite.All |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please improve formatting

Suggested change
| Resource | Permissions |
|-----------------|-----------------------------|
| Microsoft Graph | Group.ReadWrite.All |
| Resource | Permissions |
|-----------------|---------------------|
| Microsoft Graph | Group.ReadWrite.All |

Comment on lines +35 to +37
| Resource | Permissions |
|-----------------|-----------------------------|
| Microsoft Graph | User.DeleteRestore.All |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct permission for restoring soft-deleted group is Group.ReadWrite.All

Suggested change
| Resource | Permissions |
|-----------------|-----------------------------|
| Microsoft Graph | User.DeleteRestore.All |
| Resource | Permissions |
|-----------------|---------------------|
| Microsoft Graph | Group.ReadWrite.All |

Comment on lines +42 to +44
| Resource | Permissions |
|-----------------|-----------------------------|
| Microsoft Graph | User.DeleteRestore.All |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct permission for restoring soft-deleted group is Group.ReadWrite.All

Suggested change
| Resource | Permissions |
|-----------------|-----------------------------|
| Microsoft Graph | User.DeleteRestore.All |
| Resource | Permissions |
|-----------------|---------------------|
| Microsoft Graph | Group.ReadWrite.All |

@MartinM85 MartinM85 marked this pull request as draft October 17, 2025 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minimal permissions for 'entra m365group recyclebinitem' commands

3 participants