pnp / pnpcore

The PnP Core SDK is a modern .NET SDK designed to work for Microsoft 365. It provides a unified object model for working with SharePoint Online and Teams which is agnostic to the underlying API's being called
https://aka.ms/pnp/coresdk/docs
MIT License
308 stars 194 forks source link

Missing DisableSharingForNonOwners flag #1517

Open raclettierer opened 2 months ago

raclettierer commented 2 months ago

Category

Describe the bug

I need the following function like in pnp powershell

Set-PnPSite -Identity $SiteUrl -DisableSharingForNonOwners

Steps to reproduce

Expected behavior

siteProperties.SharingCapability = SharingCapabilities.ExternalUserSharingOnly; siteProperties.DisableSharingForNonOwners = true;

Additional context

jansenbe commented 2 months ago

@raclettierer : I just checked this ask and it's a bit more work as expected as this requires mapping a new CSOM call. This setting is not a property, the implementation is a method call (see https://github.com/pnp/powershell/blob/bd8bdc283c5649eb661d0ec622818e2b48e9345c/src/Commands/Admin/SetTenantSite.cs#L683-L689).