You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Allow MemberCanShare doesn't work when Authentication with Credentials or with Multi-Factor authentication enabled #3516
I try to enable sharing for members, but i always get an Access denied error.
My Account is Global Admin and also SiteAdministrator of the SPO Site
Connect-PnPOnline "https://tenantname.sharepoint.com/sites/testsite" -interactive
If i authenticate with an Azure AD App Registration it works
Connect-PnPOnline "https://tenantname.sharepoint.com/sites/testsite" -ClientId $clientid -Thumbprint $thumbprint -Tenant $tenantid
Expected behavior
It should change the SharingSetting to SiteMembers can share files and folders also with interactive login
Actual behavior
Connect-PnPOnline "https://tenantname.sharepoint.com/sites/testsite" -interactive
$web = Get-PnPWeb -Includes MembersCanShare, AssociatedMemberGroup.AllowMembersEditMembership
$web.MembersCanShare = $true
$web.Update()
$web.Context.ExecuteQuery()
MethodInvocationException:
Line |
5 | $web.Context.ExecuteQuery()
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Exception calling "ExecuteQuery" with "0" argument(s): "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"
additional information: Set-PnPTenantSite -Identity "https://tenantname.sharepoint.com/sites/testsite" -DisableSharingForNonOwners:$false
or Set-PnPSite -DisableSharingForNonOwners:$false
does not work regardless of authentication
also the same behavior when i use the Parameter "MembersCanShare="true" in the pnp provisioning template
works with app registration -- doesnt work with -interactive authentication <pnp:WebSettings NoCrawl="false" WelcomePage="SitePages/Home.aspx" CommentsOnSitePagesDisabled="false" QuickLaunchEnabled="false" SearchScope="DefaultScope" SearchBoxInNavBar="Inherit" MembersCanShare="true" />
Activity
ibaettigdev commentedon Oct 18, 2023
additional information:
Set-PnPTenantSite -Identity "https://tenantname.sharepoint.com/sites/testsite" -DisableSharingForNonOwners:$falseor
Set-PnPSite -DisableSharingForNonOwners:$falsedoes not work regardless of authentication
ibaettigdev commentedon Oct 18, 2023
also the same behavior when i use the Parameter "MembersCanShare="true" in the pnp provisioning template
works with app registration -- doesnt work with -interactive authentication
<pnp:WebSettings NoCrawl="false" WelcomePage="SitePages/Home.aspx" CommentsOnSitePagesDisabled="false" QuickLaunchEnabled="false" SearchScope="DefaultScope" SearchBoxInNavBar="Inherit" MembersCanShare="true" />