How to Control External OneDrive Sharing and Verification Codes
Question details
The user wants to control external OneDrive for Business sharing when recipients without Microsoft accounts receive eight-digit verification codes, and to make sure these links do not bypass Conditional Access or MFA.
- Product
- OneDrive for Business / SharePoint Online
- Device & OS
- not provided
- Scenario
- An organization needs to enforce Microsoft 365 sharing and access controls for external file recipients.
- Observed behavior
- External recipients use one-time verification codes to open shared files, so standard Conditional Access and multifactor authentication requirements may not apply.
Sign in to the Microsoft 365 admin center with an account that has Global admin or SharePoint admin permissions, and verify the current external sharing settings for SharePoint and OneDrive before changing them.
Set OneDrive and SharePoint external sharing to only people in your organization
Use this when external sharing is not required and you need to block verification-code links across the tenant.
Microsoft does not provide a tenant setting that requires every external recipient to create a Microsoft account. Disabling external sharing or setting sharing to Only people in your organization is the direct way to prevent one-time passcode links from bypassing Conditional Access and MFA.
Sign in to the Microsoft 365 admin center at admin.microsoft.com, then select Admin centers > SharePoint.
In the SharePoint admin center, expand Policies and click Sharing.
Under External sharing, move both the SharePoint and OneDrive sliders to Only people in your organization.
Click Save at the bottom of the page. External recipients will no longer be able to access shared files through verification-code links.
Use Azure AD B2B guest accounts for approved external collaborators
Choose this when you still need external collaboration but want recipients to authenticate so Conditional Access and MFA can be enforced.
Use WPS Office to Control Document Sharing Without OneDrive Verification-Code Links
WPS Office is a free, lightweight Microsoft Office alternative with WPS Cloud sharing and full support for Word, Excel, and PowerPoint files, so you can share documents through controlled WPS Cloud links instead of OneDrive one-time passcode links.
- 1. Download WPS Office: Click Download WPS Office Free and install the suite on Windows, macOS, Android, or iOS.
- 2. Open your Microsoft Office files: Launch WPS Office and open .docx, .xlsx, or .pptx files directly from your local or cloud storage.
- 3. Use WPS Cloud for sharing: Save the file to WPS Cloud and share it with specific team members from within WPS Office.

Frequently Asked Questions
Why don’t OneDrive verification-code links follow Conditional Access policies?
Verification-code recipients are not signed in to a Microsoft 365 identity, so Conditional Access policies are not evaluated. Conditional Access applies to authenticated users and guest accounts.
Can I force external recipients to create a Microsoft account before opening shared files?
No. Microsoft does not expose a setting that requires external recipients to create a Microsoft account. The closest control is to disable external sharing or restrict sharing to internal users.
What happens to existing external sharing links when I set sharing to Only people in your organization?
External recipients lose access to those shared files. Internal users and links scoped to people in your organization continue to work according to the new tenant policy.
How do I check my current OneDrive and SharePoint external sharing settings?
Open the SharePoint admin center from the Microsoft 365 admin center, expand Policies, click Sharing, and review the SharePoint and OneDrive external sharing sliders.
Does WPS Office support files created in OneDrive for Business?
Yes. WPS Office opens and saves .docx, .xlsx, and .pptx files, and includes WPS Cloud for sharing with specific users.




