Our tenant received a new feature which allows for access requests to be directed to the
$Context.Web.AssociatedOwnerGroup property. This is a nice feature because you can now have it automatically notify the owners instead of a distribution list or comma separated list of email addresses. Below is a screenshot from Microsoft's page on the feature.
Previously to return the list of emails/individual for receiving the emails you could run this sequence to retrieve the property.
$Context.Web.Retrieve('RequestAccessEmail') $Context.ExecuteQuery() $Context.Web.RequestAccessEmail firstname.lastname@example.org
I have found that you can see the
accessrequestsitedescription property by pulling all properties for the site.
$Context.Load($Context.Web.AllProperties) $Context.ExecuteQuery() $Context.Web.AllProperties.FieldValues.accessrequestsitedescription Test Message
What I am trying to determine is how to identify if the Access Request configuration is pointing to the
$Context.Web.AssociatedOwnerGroup, or just not configured at all. I have also confirmed that
Get-PnPRequestAccessEmails does not return this information as of now.