Forum Discussion
Set SharePoint access requests to owner group
How can I set the Access Request Settings to the Owner group on an O365 SharePoint site ?
I could not find any method in PnP PowerShell or CSOM... Set-PnPRequestAccessEmails only allows to set emails, not to select the site owner group.
The option is available through the UI though :
21 Replies
- EricD35Copper Contributor
Hi,
Did you find a solution for your problem ?
I have exactly the same problem to solve. I need to define RequestAcces on the Owner Group, not on a specific email...
Eric.
- Markus HanischBrass ContributorTo enable this email setting and send the notification to the owner, use the below PnP PowerShell snippets .To add multiple emails to the settings, use the below cmdlet.
- $cred = Get-Credential
- Connect-PnPOnline -Url https://.sharepoint.com -Credential $cred
- Set-PnPRequestAccessEmails -Emails ktskumar@<tenant>.onmicrosoft.com
The below PnP Powershell snippet is used to get the emails associated to allow access requests settings.- Set-PnPRequestAccessEmails -Emails @( ktskumar@<tenant>.onmicrosoft.com; user1@<tenant>.onmicrosoft.com )
- $cred = Get-Credential
- Connect-PnPOnline -Url https://.sharepoint.com -Credential $cred
- Get-PnPRequestAccessEmails
Source:
https://www.c-sharpcorner.com/blogs/allow-access-requests-email-settings-in-sharepoint-site-using-pnp-powershell - Deleted
It's set to Site Owner Group by default . You don't need to set it. If you need to send the request to a different email address you can still do it using the same powershell.
- FouziyaCopper Contributor
Nop. On my tenant by default access requests are defined to be sent to the user who created the site. Quite annoying when you have to handle a large number of sites.
- Deleted
StephenRice - I know you were looking for feedback and pretty involved in the Access Request piece, have any insights on this one?