logo
search
License & Subscription Issues

How to Enable Teams, SharePoint, and Sway While Restricting Other Microsoft 365 Services

Bushra ParveenBushra Parveen Oct 21, 2026 868 views

Question details

Administrators need to limit user access to certain Microsoft 365 services, such as Exchange Online and OneDrive, while ensuring that Microsoft Teams, SharePoint, and Sway remain fully accessible.

How to Enable Teams, SharePoint, and Sway While Restricting Other Microsoft 365 Services
Product
Microsoft 365
Device & OS
not provided
Scenario
Managing user licenses and access permissions in an enterprise Microsoft 365 tenant environment.
Observed behavior
Users currently have access to all assigned Microsoft 365 services, but the administrator wants to selectively disable mailbox and personal file storage access without impacting core collaborative tools.
Before you start

Ensure you have Global Administrator or SharePoint Administrator privileges in your Microsoft 365 tenant, and verify the exact tenant admin URL and user details before executing any PowerShell commands.

Solution 1Recommended

Use Microsoft 365 Admin Center and PowerShell to Restrict Services

This two-part solution allows administrators to disable Exchange Online via the Admin Center and restrict OneDrive for Business access using SharePoint Online PowerShell.

While some services like Exchange Online can be managed directly through license toggles in the Microsoft 365 admin center, OneDrive for Business does not have a simple per-user license switch. To restrict OneDrive, administrators must lock the user's personal SharePoint site using PowerShell.

1
Disable Exchange Online in the Admin Center

Open the Microsoft 365 admin center and navigate to 'Active users'. Select the target user, choose 'Manage products', click on the assigned license, and uncheck 'Exchange Online' to remove mailbox access.

2
Install and Connect to SharePoint Online PowerShell

Open PowerShell as an administrator and install the module by running: `Install-Module -Name Microsoft.Online.SharePoint.PowerShell`. Then, connect to your tenant by running: `Connect-SPOService -Url https://[your-tenant]-admin.sharepoint.com`.

3
Lock the User's OneDrive Site

Run the following command to restrict access to the user's personal SharePoint (OneDrive) site: `Set-SPOSite -Identity https://[your-tenant]-my.sharepoint.com/personal/[user_onmicrosoft_com] -LockState NoAccess`. Replace the bracketed text with your actual tenant and user information.

Use Microsoft 365 Admin Center and PowerShell to Restrict Services
Important Note on Bulk Changes: If you plan to run this script from a CSV file for multiple users, always test the impact on a single test account first to ensure Teams, SharePoint, and Sway functionality remains unaffected.
Free Microsoft Office alternative

Looking for a Lightweight, Easy-to-Manage Office Solution?

Managing complex Microsoft 365 licenses and PowerShell scripts can be overwhelming for IT administrators. If your team needs powerful productivity tools without the heavy administrative burden, WPS Office offers a free, lightweight, and highly compatible alternative to Microsoft Office.

  1. 1. Download WPS Office: Visit the official WPS Office website and download the free installer for your operating system.
  2. 2. Install the Software: Run the installer and follow the simple on-screen instructions to set up the software in minutes.
  3. 3. Start Working Immediately: Open WPS Office to seamlessly view, create, and edit your existing Microsoft Office documents without any complex configurations.
Fully compatible with Microsoft Word, Excel, and PowerPoint formatsNo complex tenant licensing or PowerShell management requiredLightweight installation with a familiar, easy-to-use interfaceCost-effective offline productivity solution for individuals and teams
microsoft office alternative - wps office

Frequently Asked Questions

Can I disable OneDrive for Business directly from the Microsoft 365 Admin Center?

No, there is currently no direct built-in toggle to disable OneDrive for Business in the Microsoft 365 Admin Center. You must use SharePoint Online PowerShell to lock the user's personal SharePoint site.

Will locking a user's OneDrive affect their access to Microsoft Teams?

Locking a user's OneDrive will not prevent them from logging into and using Microsoft Teams. However, they will be unable to upload or share files directly from their personal OneDrive within Teams chats.

What permissions are required to run the SharePoint Online PowerShell commands?

You must be assigned either the Global Administrator or SharePoint Administrator role in your Microsoft 365 tenant to execute the Set-SPOSite commands successfully.

Can I apply the OneDrive restriction to multiple users at once?

Yes, administrators can create a PowerShell script that imports a CSV file containing user URLs to iterate through and apply the lock state in bulk. It is highly recommended to test the script on a small group first.