Skip to content

Add PnP geo administrator cmdlet#5381

Merged
gautamdsheth merged 1 commit into
devfrom
gautamdsheth-planning-geo-admin
Jul 3, 2026
Merged

Add PnP geo administrator cmdlet#5381
gautamdsheth merged 1 commit into
devfrom
gautamdsheth-planning-geo-admin

Conversation

@gautamdsheth

Copy link
Copy Markdown
Collaborator

Before creating a pull request, make sure that you have read the contribution file located at

https://github.com/pnp/powerShell/blob/dev/CONTRIBUTING.md

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

N/A

What is in this Pull Request ?

Adds Add-PnPGeoAdministrator to mirror SharePoint Online Management Shell's Add-SPOGeoAdministrator for multi-geo administrators.

The cmdlet supports the same UserPrincipalName, GroupAlias, and ObjectId parameter sets, reuses the existing multi-geo REST client, and posts to the GeoAdministrators API with matching payload shape and no output. This also adds the minimal internal models, documentation, and Current nightly changelog entry.

Validation included building the project and comparing command metadata and payload serialization with the SPO module.

Guidance

N/A

Copilot AI review requested due to automatic review settings July 3, 2026 20:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new SharePoint Online admin cmdlet, Add-PnPGeoAdministrator, to manage multi-geo administrators via the existing MultiGeo REST API infrastructure.

Changes:

  • Introduces Add-PnPGeoAdministrator with parameter sets for UserPrincipalName, GroupAlias, and ObjectId.
  • Extends MultiGeoRestApiClient with a GeoAdministrators POST operation and API-version gating.
  • Adds minimal internal request/response models, enum, and cmdlet documentation.

Reviewed changes

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

Show a summary per file
File Description
src/Commands/Utilities/MultiGeo/MultiGeoRestApiClient.cs Adds GeoAdministrators endpoint support and version checks.
src/Commands/Model/GeoAdministratorEntityData.cs Introduces request payload model for adding geo admins.
src/Commands/Model/GeoAdministrator.cs Introduces response model (extends request payload with GeoLocation).
src/Commands/Enums/GroupMemberType.cs Adds enum for principal type serialization.
src/Commands/Admin/AddGeoAdministrator.cs Adds the new Add-PnPGeoAdministrator cmdlet implementation.
documentation/Add-PnPGeoAdministrator.md Adds user-facing cmdlet documentation with examples and syntax.
CHANGELOG.md Adds a “Current nightly” entry for the new cmdlet.

Comment thread CHANGELOG.md Outdated
Comment thread src/Commands/Admin/AddGeoAdministrator.cs Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@gautamdsheth gautamdsheth force-pushed the gautamdsheth-planning-geo-admin branch from 7532d82 to a0743ac Compare July 3, 2026 21:13
@gautamdsheth gautamdsheth merged commit 9ee692f into dev Jul 3, 2026
5 checks passed
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.

2 participants