Skip to content

Conversation

@milanholemans
Copy link
Contributor

Closes #5970

Copilot AI review requested due to automatic review settings January 12, 2026 00:40
Copy link

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

This pull request enhances the spo site hubsite connect and spo site hubsite disconnect commands by adding an --asAdmin option that allows SharePoint administrators to perform these operations using tenant admin APIs. The PR also migrates both commands from the legacy options/validators pattern to the modern Zod schema validation pattern.

Changes:

  • Added --asAdmin option to enable hub site connection/disconnection operations as a SharePoint administrator
  • Migrated both commands from legacy validation to Zod schema validation
  • Updated tests to use schema-based validation and added test coverage for the new asAdmin functionality
  • Enhanced documentation with permissions tables and examples demonstrating the new asAdmin option

Reviewed changes

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

Show a summary per file
File Description
site-hubsite-disconnect.ts Migrated to Zod schema validation and added asAdmin option to use tenant admin API endpoint
site-hubsite-disconnect.spec.ts Updated tests to use schema validation and added test for asAdmin functionality
site-hubsite-connect.ts Migrated to Zod schema validation and added asAdmin option to use tenant admin API endpoint
site-hubsite-connect.spec.ts Updated tests to use schema validation and added test for asAdmin functionality
site-hubsite-disconnect.mdx Added documentation for asAdmin option, permissions table, and usage example
site-hubsite-connect.mdx Added documentation for asAdmin option, permissions table, and usage example

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.

Connect and disconnect hub site as SP admin

1 participant