Description
Guest access to a SharePoint site or a OneDrive expires automatically after
{{ guest_access_expiration_days }} days (ExternalUserExpirationRequired = True,
ExternalUserExpireInDays). The expiry is set when the guest joins the site, through a sharing link
or direct access; site owners can extend it for a guest who still needs access.
Rationale
Guest access is rarely removed when a project ends. Stale guest permissions are a standing exposure: the external account may be compromised, its owner may have changed employer, and nobody reviews it. An automatic expiry makes access time-bound by default and forces a conscious renewal.
Impact
Guests lose access to the site or OneDrive after the period unless an owner extends it from the site permissions page (Manage guest expiration). Expiry values are set as guests join: guests already present before the policy are not covered until they join again. The guest account itself stays in Entra; remove inactive guests with access reviews (CB-M365-TENANT-013).
Setting
| Location | SharePoint admin center > Policies > Sharing > More external sharing settings > Guest access to a site or OneDrive will expire automatically after this many days |
| Default | Off (ExternalUserExpirationRequired = False) |
| Recommended | On, {{ guest_access_expiration_days }} days or less |
Parameters
| Parameter | Baseline | Hardened | Bounds |
|---|---|---|---|
guest_access_expiration_daysinteger, days. Days after which a guest's access to a site or OneDrive expires (SharePoint accepts 30 to 730). | 30 | 30 | 30 to 730 |
The value used is your override (tailoring file), else the profile's, else the one of the profile it extends, else the default. Bounds limit what an override may set.
Audit
- Sign in to the SharePoint admin center (https://admin.microsoft.com/sharepoint) as at least a Global Reader.
- Browse to Policies > Sharing > More external sharing settings and check that Guest
access to a site or OneDrive will expire automatically after this many days is selected with at
most
{{ guest_access_expiration_days }}. - With the SharePoint Online Management Shell (SharePoint Administrator):
Get-SPOTenant | Select-Object ExternalUserExpirationRequired, ExternalUserExpireInDays. - Fail if external sharing is allowed and
ExternalUserExpirationRequiredisFalseorExternalUserExpireInDaysis greater than{{ guest_access_expiration_days }}.
Remediation
- Tell site owners that guests will expire and how to extend them.
- In the SharePoint admin center, browse to Policies > Sharing > More external sharing
settings, select Guest access to a site or OneDrive will expire automatically after this many
days, enter
{{ guest_access_expiration_days }}and Save. Role: SharePoint Administrator. - PowerShell equivalent:
Set-SPOTenant -ExternalUserExpirationRequired $true -ExternalUserExpireInDays {{ guest_access_expiration_days }}.
Rollback
Run Set-SPOTenant -ExternalUserExpirationRequired $false. Expiry dates already set on guests are
not cleared automatically; owners can extend them.
References
- Manage sharing settings for SharePoint and OneDrive in Microsoft 365 Microsoft, vendor-doc, accessed 2026-10-24
- Set-SPOTenant (SharePoint Online Management Shell) Microsoft, vendor-doc, accessed 2026-10-24
- Manage guest expiration for a site Microsoft, vendor-doc, accessed 2026-10-24
Mappings
| Framework | ID | Relation |
|---|---|---|
| NIST SP 800-53 Rev. 55.1.1 | AC-2(3) | related |
| NIST SP 800-53 Rev. 55.1.1 | AC-2 | related |
How this control relates to the other framework's: equivalent, stricter, looser, partial or related.
Threats mitigated
| Taxonomy | ID |
|---|---|
| MITRE ATT&CK | T1078.004 |
Related controls
- related
CB-M365-COLLAB-002Enable SharePoint and OneDrive integration with Microsoft Entra B2B - related
CB-M365-COLLAB-003Restrict SharePoint external sharing to authenticated guests - related
CB-M365-TENANT-013Review guest access periodically
People and lifecycle
| Authors |
|
| Introduced in | v0.1.0 |
| Created, updated | 2026-10-24, 2026-10-24 |
| Translations | fr |