Skip to content

Adds permissions section to policy and resource namespace documentation#7140

Merged
MartinM85 merged 1 commit intopnp:mainfrom
AlejandroGispert:main
Mar 11, 2026
Merged

Adds permissions section to policy and resource namespace documentation#7140
MartinM85 merged 1 commit intopnp:mainfrom
AlejandroGispert:main

Conversation

@AlejandroGispert
Copy link
Copy Markdown
Contributor

Closes #6949

Author: Alejandro Gispert
First-time contributor to cli-microsoft365

Summary

Adds the Permissions section to the documentation for entra policy list and entra resourcenamespace list, and confirms the existing Permissions section for entra roleassignment add is correct.

Changes

entra policy list

  • File: docs/docs/cmd/entra/policy/policy-list.mdx
  • Permissions: Policy.Read.All (Delegated and Application)
  • Rationale: The command calls /v1.0/policies/* endpoints (authorizationPolicy, conditionalAccessPolicies, tokenLifetimePolicies, etc.). The Microsoft Graph permissions reference specifies Policy.Read.All for these policy read operations.

entra resourcenamespace list

  • File: docs/docs/cmd/entra/resourcenamespace/resourcenamespace-list.mdx
  • Permissions: RoleManagement.Read.Directory (Delegated and Application)
  • Rationale: The command calls GET /beta/roleManagement/directory/resourceNamespaces. Verified by running the command with an app registration that has this permission.

entra roleassignment add

  • File: docs/docs/cmd/entra/roleassignment/roleassignment-add.mdx
  • Status: No changes. Existing Permissions section is correct.
  • Verification: The Create unifiedRoleAssignment API requires RoleManagement.ReadWrite.Directory for both delegated and application access.

Documentation standards

  • Permissions section placed before Examples
  • Tabs used for Delegated and Application permissions
  • Single resource (Microsoft Graph) per command
  • Matches format used in other commands (e.g. roleassignment-add, plan-list)

Related

Addresses the Permissions documentation effort for Entra commands. Makes it easier to run the CLI with custom app registrations and application permissions by documenting the minimal required permissions.

@milanholemans
Copy link
Copy Markdown
Contributor

Hi @AlejandroGispert, thanks for this PR! We'll try to review it ASAP.
One remark, next time please comment on the issue first so we can assign it to you. This ensures that people do not unknowingly work on the same issue.

Copy link
Copy Markdown
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.

Thank you for the contribution @AlejandroGispert. Great job 👍

I have one major thing. According to the ticket, you should add the permissions section to m365 entra roleassignment add and you have added the permissions for m365 entra app role commands.

Please revert the changes in the app-role-add.mdx, app-role-list.mdx and app-role-remove.mdx files.

The m365 entra roleassignment add command already contains the permissions section, so no changes are required in this file.

@MartinM85 MartinM85 self-assigned this Mar 1, 2026
@MartinM85 MartinM85 marked this pull request as draft March 1, 2026 09:40
@AlejandroGispert
Copy link
Copy Markdown
Contributor Author

Thank you for the contribution @AlejandroGispert. Great job 👍

I have one major thing. According to the ticket, you should add the permissions section to m365 entra roleassignment add and you have added the permissions for m365 entra app role commands.

Please revert the changes in the app-role-add.mdx, app-role-list.mdx and app-role-remove.mdx files.

The m365 entra roleassignment add command already contains the permissions section, so no changes are required in this file.

@AlejandroGispert
Copy link
Copy Markdown
Contributor Author

Hi @MartinM85,
I have identified the issue with my last commit,I accidentally pushed the wrong changes.
I can revert it right away if that’s the best approach. What do you prefer?

@MartinM85
Copy link
Copy Markdown
Contributor

Hi @MartinM85, I have identified the issue with my last commit,I accidentally pushed the wrong changes. I can revert it right away if that’s the best approach. What do you prefer?

Hi @AlejandroGispert, reverting the change in the commit c729a39 should be fine. During the merge we squash the commits.

@AlejandroGispert AlejandroGispert force-pushed the main branch 2 times, most recently from 5153eee to d398b4a Compare March 3, 2026 14:03
@AlejandroGispert
Copy link
Copy Markdown
Contributor Author

Hi @MartinM85, the app-role changes have been reverted. The PR now only includes the Permissions sections for policy-list and resourcenamespace-list, all squashed into a single commit. Thanks.

@milanholemans milanholemans marked this pull request as ready for review March 3, 2026 14:18
Copilot AI review requested due to automatic review settings March 3, 2026 14:18
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds minimal Microsoft Graph permissions documentation to selected Entra command reference pages, aligning with the ongoing docs standardization effort for permissions sections.

Changes:

  • Added a Permissions section (Delegated + Application) to entra policy list.
  • Added a Permissions section (Delegated + Application) to entra resourcenamespace list.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
docs/docs/cmd/entra/policy/policy-list.mdx Documents required Microsoft Graph permission (Policy.Read.All) for entra policy list.
docs/docs/cmd/entra/resourcenamespace/resourcenamespace-list.mdx Documents required Microsoft Graph permission (RoleManagement.Read.Directory) for entra resourcenamespace list.

Copy link
Copy Markdown
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.

Approved. Thank you for the contribution @AlejandroGispert 🚀

I will merge it later.

@MartinM85 MartinM85 merged commit 2a53a19 into pnp:main Mar 11, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minimal permissions for 'entra policy', 'entra resourcenamespace', 'entra roleassignment' commands

4 participants