When new users get access denied to the site, they use the access request feature to inform the Site Owner to grant them the access.
From the Site Permissions -> Access Requests Settings -> Allow Access Requests feature has the option for setting the email. So, whenever a user requests access to the site/ file/folder, an email will be sent to notify the user to provide them the access.


If we remove the email from the "Allow Access Requests" settings, this feature gets disabled and the new user won't notify the user when they need access.
To enable this email setting and send the notification to the owner, use the below PnP PowerShell snippets .
- $cred = Get-Credential
- Connect-PnPOnline -Url https://<tenant>.sharepoint.com -Credential $cred
- Set-PnPRequestAccessEmails -Emails ktskumar@<tenant>.onmicrosoft.com
- Set-PnPRequestAccessEmails -Emails @( ktskumar@<tenant>.onmicrosoft.com; user1@<tenant>.onmicrosoft.com )
- $cred = Get-Credential
- Connect-PnPOnline -Url https://<tenant>.sharepoint.com -Credential $cred
- Get-PnPRequestAccessEmails

Join the conversation! Your thoughts help the community grow.