Home > SharePoint Site Collection Provisioning and Management > Best Practices for Managing Site Collections > Site Collection Automated Locking
Export to PDFWhen you enable site collection lease, site collection inactivity threshold, or site collection renewal process in a site collection policy, you can also enable automated site collection locking. If a site collection lease expiration task, inactivity task, or renewal task is not completed within the specified amount of time, the site collection will be automatically locked.
In a site collection automated locking profile, you can configure the condition to lock site collections, select a locking type, as well as enable site collection archiving or deletion for escalation.
Complete the following steps to create a site collection automated locking profile:
In Settings, click Site Collection Automated Locking Profile Management in the Request Management group.
Click Create on the ribbon, and then configure the following settings.
Name and Description – Enter a name and an optional description for the site collection automated locking profile.
Site Collection Automated Locking – Configure the following settings for locking site collections.
Choose one of the following locking types:
Lock the site collection in “no access” status
Lock the site collection in “read-only” status
Define the condition to lock site collections. Enter a number in the text box and select Day(s), Week(s), Month(s), or Year(s) as the unit. If the automated lifecycle task or renewal task is not completed after the specified amount of time, the site collection will be locked in “no access” or “read-only” status.
You can also enable the following options:
Send a reminder email to the lifecycle task assignees before the site collection is locked – Select the checkbox to enable a reminder before the site collection is locked. Select a reminder profile from the drop-down list. You can also click Create New to create a new one. For more information about configuring a reminder profile, refer to Configure Reminder Profiles for Upcoming Expiration.
Notify the following people when the site collection is locked – Select the checkbox to notify users or Microsoft 365 Groups when the site collection is locked. Enter the names of the users or Microsoft 365 Groups that will be notified about the site collection locking. You can also enter the following roles: $Primary site collection contact, $Secondary site collection contact, and $Primary site collection administrator. For detailed descriptions of the roles, refer to Appendix F - Supported Variable Roles.
Then, select an email template from the Email template drop-down list.
Start an additional site collection lifecycle action to escalate – Select the checkbox to generate a site collection lifecycle action task after the site collection is locked at a certain time. Enter a number in the text box and select Day(s), Week(s), Month(s), or Year(s) as the unit. Select Delete Site Collection or Archive Site Collection as the lifecycle action from the drop-down list. If you select either of the lifecycle action, you can also configure the following settings:
Use a unique approval process for this automated action – Select a unique approval process instead of the default one for the lifecycle action task. Select an approval process from the drop-down list or click Create New to create a new approval process. If the configurations of the selected approval process do not meet your requirements, click Create From This Existing Approval Process to create a new one based on the selected approval process.
Send a reminder email to the lifecycle task assignees before the escalation task is generated – Select this checkbox to send notification emails to approvers about the site collection escalation before the lifecycle action task is generated. Select a reminder profile from the drop-down list. You can also click Create New to create a new one. For more information about configuring a reminder profile, refer to Configure Reminder Profiles for Upcoming Expiration.
Custom Action – If you enabled reminder before the site collection is locked, the custom action is available. The custom action is defined via the methods that exist in a published Web Service. When the reminder for upcoming site collection locking is triggered for the first time, the custom action is executed. After the site collection is locked, the custom action ceases its execution.
Select the Enable custom action along with the upcoming site collection locking reminder checkbox and complete the following steps:
Enter the URL of your published Web Service in the Web Service Address text box.
Click Retrieve to retrieve the methods in the Web Service.
Select your desired method from the drop-down list.
If there are parameters defined in the selected method, the parameters are displayed in a table. Enter the value for each parameter in the corresponding text box.
Click Save to save your configurations.