What this check looks at
Checks that a guest’s access to a site or OneDrive ends on its own within 30 days unless someone renews it.
ExternalUserExpirationRequired and ExternalUserExpireInDays decide whether a guest’s access to a site or OneDrive ends on its own after a number of days, unless a site owner renews it. Microsoft ships it off.
The check reads the setting from the SharePoint admin API as ConfigCheckup Automation, only where the client granted it Sites.FullControl.All, and only ever reads it. It passes when sharing outside is off, or guest access expires within 30 days, and fails when it never expires or only after longer.
Why it matters
Guests are invited for a piece of work and then forgotten. Access that ends on its own closes the door for partners and contractors the business no longer works with, without anyone having to remember.
Guests are invited for a piece of work and then forgotten. Access that ends on its own closes the door on contractors and partners the business no longer works with, without anyone having to remember to do it.
CIS Microsoft 365 Foundations Benchmark 7.2.9 asks for guest access to expire within 30 days. Site owners are emailed before it ends and can renew a guest who still needs it.
How to fix it
Where: SharePoint admin centre → Policies → Sharing
Before you start
- Site owners get an email before a guest’s access ends and can renew it: tell them so before turning it on.
- Tell users what is changing and when, with a contact for problems.
Step by step
- Tell people what changes. Tell staff, and site owners who share a lot with partners, that guests’ access will end after the number of days set unless they renew it, and that they are emailed first, the date it changes and who to ask about it.
- Turn on guest expiry. In the SharePoint admin centre (https://<tenant>-admin.sharepoint.com), go to Policies > Sharing > More external sharing settings, tick "Guest access to a site or OneDrive will expire automatically after this many days" and enter 30 or fewer. Select Save.
- Or set it with PowerShell. Connect-SPOService -Url https://<tenant>-admin.sharepoint.com, then Set-SPOTenant -ExternalUserExpirationRequired $true -ExternalUserExpireInDays 30.
- Check it took effect. Get-SPOTenant | Select-Object ExternalUserExpirationRequired, ExternalUserExpireInDays shows True and 30 or fewer, and the next assessment passes.
With PowerShell
Connect-SPOService -Url https://<tenant>-admin.sharepoint.com Set-SPOTenant -ExternalUserExpirationRequired $true -ExternalUserExpireInDays 30
What users will notice
A guest’s access to a site or OneDrive ends after the number of days set unless a site owner renews it.
How to confirm it worked
Get-SPOTenant | Select-Object ExternalUserExpirationRequired, ExternalUserExpireInDays shows True and 30 or fewer.
Frameworks and controls
This check maps to controls in 13 frameworks. Passing it is evidence that the setting is in place, not a certification against any of them.
| Framework | Control |
|---|---|
| NCSC CAF | B2.c Privileged user management |
| DSPT | Standard 4: Managing data access |
| DORA | Art. 9(4)(c) Limiting logical access to what is required |
| NIS2 | Art. 21(2)(i) Access control and asset management |
| Zero Trust | IdentitiesData |
| SOC 2 | CC6.2 User registration, authorisation and removalCC6.3 Role-based access and least privilege |
| NIST SP 800-171 | 3.1.1 Limit system access to authorised users, processes and devices |
| CMMC Level 2 | AC.L2-3.1.1 Authorized Access Control |
| ISO 27001:2022 | A.5.18 Access rightsA.5.19 Information security in supplier relationships |
| CIS M365 | 7.2.9 Ensure guest access to a site or OneDrive will expire automatically |
| CIS Controls v8.1 | 6.1 Establish an access granting process (IG1) |
| NIST CSF 2.0 | PR.AA-05: Access permissions, entitlements, and authorizations are defined in a policy, managed, enforced, and reviewed, and incorporate the principles of least privilege and separation of duties |
| NCSC 10 Steps | Identity and access managementData security |
The framework mappings were last checked against the published standards in October 2026.
Microsoft’s documentation
- Manage guest expiration for SharePoint (Microsoft Learn)