Skip to content

Doc: Add-PnPFileSharingInvite -SendInvitation prose is inverted relative to parameter name + Graph contract #5318

@t-granlund

Description

@t-granlund

Doc defect

The reference page for Add-PnPFileSharingInvite and Add-PnPFolderSharingInvite documents the -SendInvitation parameter with prose that is inverted relative to:

  1. The parameter name itself (-SendInvitation strongly implies present ⇒ invite is sent)
  2. Example 2 on the same documentation page (which uses -SendInvitation to send an email)
  3. The underlying Microsoft Graph contract (POST /drives/{drive-id}/items/{item-id}/invite where sendInvitation: true ⇒ email is sent — Graph reference)

Current prose (verified 2026-05-16)

Specifies if an email or post is generated (false) or if the permission is just created (true)

That reads as: false ⇒ email; true ⇒ no email. The actual behavior is the opposite (and matches Example 2 and the Graph contract).

Why this matters operationally

A reader who trusts the prose will believe omitting -SendInvitation sends the mail, and will defensively add the switch to suppress it — and accidentally send mail at scale. This isn't hypothetical; my organization had a notification incident where ~57 users got unwelcome emails during a SharePoint provisioning run. We've since added a ResourceBehaviorOptions: WelcomeEmailDisabled defense at group-creation time, but the inverted prose remains a footgun for anyone else using these cmdlets.

Suggested replacement prose

Specifies that a notification email is sent to the recipients when present.
When omitted, the permission is created silently (no email).

This wording matches:

  • The parameter name's natural reading
  • Example 2 on the same page
  • The Graph sendInvitation contract

Source pages

(Both pages share the same inverted prose for the -SendInvitation parameter.)

Context

Filed as part of an ADR work-stream on notification suppression at scale (ADR-011: Notification suppression by default) in Delta-Crown-Org/DeltaSetup. Happy to PR the doc fix if a doc PR is welcome — point me at the source-of-truth file for these reference pages.

Thanks for maintaining PnP PowerShell — it's foundational to my organization's SharePoint deploy pipeline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions