When you are creating a SharePoint Online, by default the owners of that specific site will manage all the request access to the SharePoint site. If the user doesn’t have permissions to access to the SharePoint site these owners will receive an email to authorize or not these users to access the site. On the following article, we will use PNP Powershell to add an extra email to the default configuration.
When you run the PnP PowerShell below, you’ll add to the specific site a new email to receive the notification. I’ve also checked the possibility to configure the custom message directly from the PnP PowerShell but it was not possible.
Connect-PnPOnline -Url https://contoso.sharepoint.com/sites/contoso/ -UseWebLogin Set-PnPRequestAccessEmails -Emails "firstname.lastname@example.org" # For 1 email # Set-PnPRequestAccessEmails -Emails @("contosoAdmin1@contoso.com", "contosoAdmin2@contoso.com") # For 2 or more emails
After running this PowerShell command the email user added, it will be notified by email to manage access to that SharePoint site. Note, that at the time of release this command the possibility to add multiple emails isn’t working as intended.
Visit the next link, for more information about the configuration above where you can define the share of your SharePoint Site. On the Microsoft documentation, you can find on how to do this step on the SharePoint interface.