Forum Discussion

Sam1209's avatar
Sam1209
Brass Contributor
May 02, 2025

SharePoint Guest Expiry

We have recently enabled the SharePoint guest expiry setting on our tenant and set this at 30 days. 

However, we have noticed that this hasn't filtered down to all existing sites which have a custom guest expiration set (e.g. they are still set to expire after 60 days rather than the org level setting of 30 days). 

I know that we can change this manually on the sites that we are aware of, but we have thousands of sites. Therefore, is there a way of:

  1. Getting an export of all SharePoint sites that do not match the org level setting of 30 days guest expiry
    AND
  2. Ensuring that all SharePoint sites are set to match the org level setting of 30 days for the sites that we have external sharing switched on for

1 Reply

  • obiobis's avatar
    obiobis
    Brass Contributor

    Enable the visitor expiration policy in Azure AD external collaboration settings. You can also set it through PowerShell:

    Set-SPOTenant -ExternalUserExpirationRequired $true -ExternalUserExpireInDays 30

     

Resources