Sep 02 2018 05:51 AM
Sep 02 2018 11:24 PM
Sep 03 2018 12:11 AM
Hi @Steve Johnson, are you referring to the request form for users to complete if they don't have access?
If so, you can do this through the user interface.
On modern sites:
I hope that helps
Sep 03 2018 12:57 AM - edited Sep 03 2018 01:01 AM
Thanks guys! Sorry @Matt Weston, I should've specified that I have a whole bunch of Site Collections affected and it's causing confusion for users, so I'm looking at switching it off and adjusting our provisioning solution as appropriate too.
@Oliver Zeiser Thanks, I've tried what you've suggested, but the Allow access requests box is refusing to uncheck.
This is the code I'm running - am I missing anything do you know?
$web = Get-PnPWeb -Includes MembersCanShare, AssociatedMemberGroup.AllowMembersEditMembership
$web.MembersCanShare=$false
$web.AssociatedMemberGroup.AllowMembersEditMembership=$false
$web.RequestAccessEmail=""
$web.AssociatedMemberGroup.Update()
$web.Update()
$web.Context.ExecuteQuery()
Write-Host "Access request settings updated"
Sep 03 2018 01:32 AM
SolutionHi @Steve Johnson, try this (works in my tenancy):
Connect-PnPOnline -Url <site collection url>
$web = Get-PnPWeb
$web.RequestAccessEmail = ""
$web.Update()
Invoke-PnPQuery
Sep 03 2018 03:04 AM
Sep 03 2018 01:32 AM
SolutionHi @Steve Johnson, try this (works in my tenancy):
Connect-PnPOnline -Url <site collection url>
$web = Get-PnPWeb
$web.RequestAccessEmail = ""
$web.Update()
Invoke-PnPQuery