Hard Coded Access Request email address in sp online provisioned sites

Glenn Skinner 1 Reputation point
2022-10-17T16:22:28.097+00:00

We have .js and c# files that provision sp online modern sites with document libraries. We want to add some code so in new site collections the email address in the Access request email address field is always the same support email address.

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,395 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,958 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,012 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,129 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,625 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tong Zhang_MSFT 9,231 Reputation points
    2022-10-18T06:57:47.367+00:00

    Hi @Glenn Skinner ,

    To help you better, do you want to set a specified email address where you wish to send access request? If my understanding is wrong, please contact me in time.

    If yes, you can use the ** SPWeb.RequestAccessEmail ** property, the property can set the e-mail address to which requests for access are sent. Here is an example in the following document, you can refer to the code in this document: SharePoint : Update Access Request Settings email address using SSOM

    More information for reference:
    SPWeb.RequestAccessEmail property
    Set up and manage access requests

    Hope it can help you. Thanks for your understanding and support.

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.