How to Set Up Expiration Guest Access to SharePoint Site?

When I was working with a client who wanted to share certain documents with external users, I created a separate SharePoint site dedicated solely to external users. Once the site was ready, the client asked me a great question: “How do we set up expiration for external access so that guest users don’t keep access forever?”

This is an important topic because, when sharing files with external users, many people overlook the fact that access can become a security risk. The good news is that SharePoint and OneDrive give us two ways to control expiration for guest access:

  • Option 1: Tenant-Level Setting
  • Option 2: Site-Level Setting

Set Up Tenant-Level Expiration Guest Access to SharePoint Site

This is the global policy that we set up at the tenant (organisation) scope. It sets a default expiration period for guest access across all SharePoint sites and OneDrive accounts, unless overridden at the site level.

Now follow the steps below:

  1. In the SharePoint Admin Centre, go to Policies -> Sharing.
Set up expiration guest access to SharePoint site
  1. On the Sharing page, expand More external sharing settings to see hidden options.
Enable guest access expiration for external users in SharePoint
  1. Check the box where “Guest access to a site or OneDrive will expire automatically after this many days”
  2. Enter the number of days (between 30 and 730) that guests should have access.
Configuring expiration policy for guest users in SharePoint Online
  1. Also set “People who use a verification code must reauthenticate after this many days” This applies when sharing with external users who don’t use Microsoft accounts.
Guest access expiration settings in Microsoft 365 SharePoint
  1. Save the changes.
How to manage guest access expiration in a SharePoint site

After this is enabled, any new guest users (or sharing links created after this setting) will have their access expire after the set period.

Note: Guests added before the policy was enabled will not automatically expire. If a guest has access to multiple sites, each site’s policy is considered separately. If a site has an expiration policy at the site level, that will override the tenant policy for that site. The guest expiration policy does not affect Microsoft 365 group or Teams membership.

Set Up Site-Level Expiration Guest Access to SharePoint Site

Once the tenant-level setting is set, you can override it for specific sites for a period. This is useful for your “external users only” site, for example.

Some sites (HR, legal) may require stricter controls, while other sites may need longer access. It may be flexible on a site-by-site basis.

Now follow the steps below:

  1. In the SharePoint admin centre, go to Sites -> Active sites.
Set up expiration rules for SharePoint external access
  1. Select the site that you want to set the expiration for guest access. In the site’s settings pane, click Sharing.
Enable expiration for guest user access to SharePoint documents
  1. Scroll to the Expiration of guest access section. You will see a checkbox labelled “Same as organization-level setting” checked by default.
Expiration settings for external user access in SharePoint Online
  1. Uncheck the “Same as organization-level setting” box. Enter the number of days (or set to “never expire” if allowed) for guest access at that site.
Manage guest access duration in a SharePoint site
  1. Save. The site will now use this custom expiration policy.
Manage external sharing and guest expiration in SharePoint Online

Now this site will use its own rule, even if the organisation has a different rule.

This way, we can set up guest access expiration at the tenant level and the site level.

Additionally, you may find the following interesting tutorials:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App