Skip to content

Adds viva engage role member add command. Closes #6819#7219

Open
nanddeepn wants to merge 2 commits into
pnp:mainfrom
nanddeepn:issue-6819
Open

Adds viva engage role member add command. Closes #6819#7219
nanddeepn wants to merge 2 commits into
pnp:mainfrom
nanddeepn:issue-6819

Conversation

@nanddeepn
Copy link
Copy Markdown
Contributor

Adds viva engage role member add command. Closes #6819

Copilot AI review requested due to automatic review settings April 16, 2026 06:14
Copy link
Copy Markdown
Contributor

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 a new Viva Engage command to assign (add) a role member via Microsoft Graph, including tests and documentation, aligning the Viva Engage role management feature set.

Changes:

  • Introduces viva engage role member add Graph command supporting role/user resolution by name or id.
  • Adds Mocha test coverage for validation, successful POST behavior, and error handling.
  • Adds Docusaurus documentation page and sidebar entry for the new command.

Reviewed changes

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

Show a summary per file
File Description
src/m365/viva/commands/engage/engage-role-member-add.ts Implements the new command and Graph POST to add a member to a role.
src/m365/viva/commands/engage/engage-role-member-add.spec.ts Adds unit tests for validation, success paths, and error handling.
src/m365/viva/commands.ts Registers the new command name constant.
docs/src/config/sidebars.ts Adds the new command doc to the Viva Engage sidebar.
docs/docs/cmd/viva/engage/engage-role-member-add.mdx Adds command reference docs, including preview warning and permissions.

Comment on lines +13 to +14
roleId: z.uuid().optional(),
roleName: z.string().optional(),
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

Docs advertise short options -i/-n for --roleId/--roleName (consistent with engage-role-member-list), but the command schema doesn't define these aliases. Add .alias('i') and .alias('n') (or update docs to remove the short options) so the documented CLI usage works.

Suggested change
roleId: z.uuid().optional(),
roleName: z.string().optional(),
roleId: z.uuid().alias('i').optional(),
roleName: z.string().alias('n').optional(),

Copilot uses AI. Check for mistakes.
Comment thread docs/docs/cmd/viva/engage/engage-role-member-add.mdx Outdated
@milanholemans
Copy link
Copy Markdown
Contributor

milanholemans commented Apr 16, 2026

Thanks, we'll try to review it ASAP.

@MartinM85 MartinM85 marked this pull request as draft May 14, 2026 11:21
@MartinM85 MartinM85 self-assigned this May 14, 2026
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 @nanddeepn 🚀

Just a few notes from my side. Please check also the comments from Copilot.

Comment thread src/m365/viva/commands/engage/engage-role-member-add.ts Outdated
Comment thread src/m365/viva/commands/engage/engage-role-member-add.ts Outdated
@MartinM85 MartinM85 marked this pull request as ready for review May 20, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New command: viva engage role member add

4 participants