Forum Discussion

SimonL2250's avatar
SimonL2250
Copper Contributor
Aug 26, 2025

Deletion of an SharePoint website with an adaptive scope

We are using a retention label "Keep forever" which we have published via a retention policy. In this policy, we have established an adaptive scope based on a KQL query which selects a large part (but not all) SharePoint websites in our tenant. Since there are several new sites created every day in our tenant automatically, adding sites manually to a static scope doesn’t make practical sense. This has worked well.

Now we ran into the usecase that we would like to delete a number of (old and not used anymore) SharePoint websites. My first idea was to change the KQL statement and add a NOT Operator inside of the statement. This was fine. However, from studying the material on MS learn, this will trigger a 30 Grace Period for these sites that have been removed from the adaptive scope, although they are not part of retention policy anymore (visible by the policy lock up function). 

I read that there is a way to EXCLUDE sites from a retention policy (which doesn’t trigger the 30 Grace Period), however this option seems only to be available when using static scopes and not adaptive scopes.

Does anyone know a way to retain the flexibility provided by the adaptive scope and not be affected by the Grace Period?

3 Replies

  • Ankit365's avatar
    Ankit365
    Brass Contributor

    What you are running into is by design in Microsoft Purview. When a site falls out of the scope of a retention policy or retention label published through an adaptive scope, Microsoft 365 places it in a 30-day grace period before the retention settings are fully lifted. The point of that grace period is to prevent administrators from accidentally removing content from protection and then deleting it immediately. Unfortunately, the exclude option that you have seen in the admin center is indeed only available for static scopes, not adaptive scopes, so there is no “official” supported way to combine adaptive scoping with selective exclusions that bypass the grace timer.

    The practical approaches people use today are either to move those unwanted sites into their own dedicated static scope retention policy, where you can apply excludes as needed, or to create a temporary parallel retention policy that targets only the sites you actually want to remove and then lift that policy once you are ready. The adaptive scope remains your best option for handling the bulk of automatically created sites. Still, for the handful of sites that you know need to be deleted, you essentially have to treat them differently.

    In other words, you cannot retain the complete automation of the adaptive scope and simultaneously avoid the grace period when you remove sites from scope. Microsoft has not yet provided a mechanism for that combination. If avoiding the 30-day grace is a hard requirement, your only supported path is to put the sites you want to exclude into a separate static scope retention policy and then exclude them there.

    Hit like for the solution.

    • SimonL2250's avatar
      SimonL2250
      Copper Contributor

      I took another stab at this issue and ran into another problem. For context, currently I have around 1,000 sites I need to delete. 
      My idea was to include them per NOT Operator into my KQL statement inside of the adaptive scope. Unfortunately, there is a character limit for the KQL window. So this option is not feasible.

      Also the option with a static scope and exluding 1,000 sites by hand is not an option.

      Is there a way to handle this situation by powershell? If not, I need to think about adding a site property to all sites that can be targetet by the NOT operator in adaptive scope.

Resources