Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
Dear Ramesh Subedi,
Thank you for reaching out.
According to our investigation, you can achieve your requirement by following the steps below.
The first option allows you to disable the sync button and prevent users from saving files locally. (Please note that the sync button will still be visible; however, when users click on it, they will receive an error preventing them from syncing files locally.)
- Go to the SharePoint Admin Center → Settings → Sync.
Set the option to allow sync only for specific user computers. Any users not listed will receive an error.
- For your second question, you can use Intune to set the registry key on the targeted computers. This will remove the SharePoint listing from File Explorer.
You can follow the steps in this article ---- >> How to block OneDrive use from within Microsoft 365 Apps for enterprise and Office 2016 applications - Microsoft 365 | Microsoft Learn
Please test this method and let us know if it meets your requirements. If my answer helps you resolve your issue, please consider voting for it—it would mean a lot!
Thank you for your time and patience, we hope you have a great day!
Best regards,
Community Moderator | Sophia