How to make SharePoint verification codes expire

Require a new verification code within 30 days.

Every Microsoft 365 security check · Collaboration & Sharing · NL-SPO-106

What this check looks at

Checks that people outside who open shared content with an emailed verification code must enter a new code within 30 days.

People outside the organisation who are not guests open shared content by entering a one-time code emailed to them. EmailAttestationRequired and EmailAttestationReAuthDays decide whether, and after how many days, they must enter a new code.

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 when a new code is needed within 30 days, and fails when none is ever needed or only after longer.

Why it matters

A verification code proves who opened a file once. Without re-authentication, someone who later loses that mailbox, or leaves the partner company, keeps access to what was shared.

Without re-authentication, someone who later loses control of that mailbox, or leaves the partner company with the mailbox still working, keeps opening what was shared with them for as long as the share lasts.

CISA SCuBA MS.SHAREPOINT.3.3v2 asks for 30 days or fewer; CIS Microsoft 365 Foundations Benchmark 7.2.10 asks for 15, which the evidence shows but the check does not require.

How to fix it

Where: SharePoint admin centre → Policies → Sharing

Before you start

  • Tell users what is changing and when, with a contact for problems.

Step by step

  1. Tell people what changes. Tell staff, and site owners who share a lot with partners, that people outside who use a verification code will be asked for a new one after the number of days set, the date it changes and who to ask about it.
  2. Require a new verification code. In the SharePoint admin centre (https://<tenant>-admin.sharepoint.com), go to Policies > Sharing > More external sharing settings, tick "People who use a verification code must reauthenticate after this many days" and enter 30 or fewer (15 for CIS). Select Save.
  3. Or set it with PowerShell. Connect-SPOService -Url https://<tenant>-admin.sharepoint.com, then Set-SPOTenant -EmailAttestationRequired $true -EmailAttestationReAuthDays 15.
  4. Check it took effect. Get-SPOTenant | Select-Object EmailAttestationRequired, EmailAttestationReAuthDays shows True and the days set, and the next assessment passes.

With PowerShell

Connect-SPOService -Url https://<tenant>-admin.sharepoint.com
Set-SPOTenant -EmailAttestationRequired $true -EmailAttestationReAuthDays 15

What users will notice

People outside who open shared content with an emailed code are asked for a new code after the number of days set.

How to confirm it worked

Get-SPOTenant | Select-Object EmailAttestationRequired, EmailAttestationReAuthDays shows True and 30 or fewer (15 for CIS).

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.

The frameworks and controls NL-SPO-106 maps to
FrameworkControl
NCSC CAFB2.a Identity verification, authentication and authorisation
DSPTStandard 4: Managing data access
NIS2Art. 21(2)(j) Multi-factor authentication and secured communications
Zero TrustIdentitiesData
SOC 2CC6.1 Logical access security software, infrastructure and architectures
NIST SP 800-1713.5.2 Authenticate users, processes and devices
CMMC Level 2IA.L2-3.5.2 Authentication
ISO 27001:2022A.5.17 Authentication informationA.8.5 Secure authentication
CISA SCuBAMS.SHAREPOINT.3.3v2 Verification-code reauthentication within 30 days
CIS M3657.2.10 Ensure reauthentication with verification code is restricted
CIS Controls v8.16.2 Establish an access revoking process (IG1)
NIST CSF 2.0PR.AA-03: Users, services, and hardware are authenticated
NCSC 10 StepsIdentity and access managementData security

The framework mappings were last checked against the published standards in October 2026.

Further reading

The full Microsoft 365 security checklist, worst first

ConfigCheckup

Check this in every tenant.

ConfigCheckup runs this check on every tenant you connect and gives you a step-by-step fix guide. The next assessment confirms the fix.

14 days of daily monitoring and alerts, every finding with its fix guide, and reports on up to 3 tenants, from your first connected tenant. No card. Then choose the plan that fits.Where this check fits: Microsoft 365 security assessment for MSPs