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

  • Question

  • 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

    Wednesday, January 15, 2020 9:48 PM

Answers

  • From Stackoverflow

    This has two situations:

    1. Use default access requests. It should be the property Web.UseAccessRequestDefault
    2. Use email to reveive access requests. It would be the property Web.RequestAccessEmail

    For the UserAccessRequestDefault property to become available, the CSOM in NuGet needs to be updated to a latest stable


    Friday, January 17, 2020 12:54 PM

All replies

  • Hi James,

    Thank you for posting here.

    I'm not familiar with CSOM, but based on my search, the following link might be helpful to you.

    CSOM Property for Access Request Group

    Internal details of setting Access request settings for Sharepoint sites

    Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, January 16, 2020 6:28 AM
  • From Stackoverflow

    This has two situations:

    1. Use default access requests. It should be the property Web.UseAccessRequestDefault
    2. Use email to reveive access requests. It would be the property Web.RequestAccessEmail

    For the UserAccessRequestDefault property to become available, the CSOM in NuGet needs to be updated to a latest stable


    Friday, January 17, 2020 12:54 PM