How do I check if 'Allow access requests' is checked using CSOM in Sharepoint Team site

Mikhail 41 Reputation points
2020-01-15T21:56:48.19+00:00

We have bunch of Sharepoint sites deployed into production. I was given a task to provide a report on whether the 'Allow access requests' (located in the 'Access Requests Console') is checked or not

I do know how to check it or uncheck it programmatically (using the DisableRequestAccess() or EnableRequestAccess() methods of siteContext.Web object)

However, I can't figure out how to find out if the 'Allow access requests' is checked or not

What is the right boolean value of the siteContext.Web object that would tell me if the 'Allow access requests' is checked or not.

Thank you everyone in advance

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,866 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Justin Liu 51 Reputation points MVP
    2020-02-28T08:07:15.343+00:00

    If the Allow access requests is enable, the web.RequestAccessEmail should not be empty.

    0 comments No comments