How to remove “Add shortcut to OneDrive” in SharePoint Online?

The “Add Shortcut to OneDrive” is a handy new feature in SharePoint Online to add any Library, Folder, or File shortcuts to a user’s OneDrive, so that you can visit them later.

How does the “Add Shortcut to OneDrive” Feature work?

The “Add shortcut to OneDrive” feature is a great new way to keep track of all the frequent libraries, folders, and documents you use regularly. Upon clicking the link, it creates a shortcut link in your OneDrive for Business under the “My files” view so that you can use OneDrive for Business to assemble links for SharePoint Online.

remove add shortcut to onedrive from sharepoint sites

How to remove “Add shortcut to OneDrive”?

Problem: When users add SharePoint libraries as shortcuts, the OneDrive client on the user’s machine will attempt to sync everything (including all the files/folders in those shortcut libraries), and when the total size of the synced libraries exceeds their storage space, this immediately fills out the user’s disk space! While “Files on-Demand” settings can mitigate this issue, that’s not the case with most users! Also, when a SharePoint library or folder is already added as the shortcut in OneDrive, any attempts to sync the particular library or folder would fail.

So, Here is the PowerShell script to disable the Add shortcut to OneDrive feature. Once you run this PowerShell Shell cmdlet, the Add shortcut to OneDrive option is removed from SharePoint Online document libraries. However, existing shortcuts remain in place on OneDrive.

#Connect to SharePoint Online
Connect-SPOService "https://crescent-admin.sharepoint.com"

#Disable "Add Shortcut to OneDrive"
Set-SPOTenant -DisableAddShortCutsToOneDrive $True

It took about 15 minutes to propagate on all sites in my tenant, and the “Add shortcut to OneDrive” is totally removed on all sites. Please note, this PowerShell disables the “Add Shortcut to OneDrive” from all sites in the tenant (Not on specific sites). To turn ON add a shortcut to OneDrive back, and use:

Set-SPOTenant -DisableAddShortCutsToOneDrive $False

Here is the script in action: Add Shortcut to OneDrive buttons removed!

how to remove add shortcut to onedrive

Remove “Add shortcut to OneDrive” using PnP PowerShell

To remove the add shortcut to OneDrive feature at the tenant level, use this PnP PowerShell script:

#Parameters
$TenantAdminURL = "https://crescent-admin.sharepoint.com"

#Connect to PnP Online
Connect-PnPOnline -Url $TenantAdminURL -Interactive

#Disable Add Shortcut to OneDrive
Set-PnPTenant -DisableAddToOneDrive $True

Please note, It takes about 15 – 30 minutes to apply this setting to all sites and remove the “Add Shortcut to OneDrive” from SharePoint Online. We can’t disable the “Add Shortcut to OneDrive” feature for one specific site in SharePoint Online as of today, this setting applies to the entire tenant.

How to remove the SharePoint shortcut from OneDrive?

Shortcuts added through this feature will be listed under “My files” in OneDrive. If you have added a SharePoint File or Folder to OneDrive and want to remove it, select the linked folder you want to remove and click on the “Remove” button in the command bar.

remove the SharePoint shortcut from OneDrive

This only removes the folder link from your OneDrive – The original folder and its contents will be still accessible from your SharePoint Online. You can also remove the shortcut folder from OneDrive in file explorer.

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

14 thoughts on “How to remove “Add shortcut to OneDrive” in SharePoint Online?

  • Hi Sir,

    Is there a way to disable it on a particular site ?

    Thanks

    Reply
  • Is there a way to find out what users have used this feature?

    Reply
  • Hi, Do I need to be a global admin to do this or will SP admin suffice?

    Reply
  • Will this work for disabling the Sync option? having both options causes issues for users.

    Reply
  • The “Add shortcut to OneDrive” is missing for me. Would you know how to add it back?

    Reply
  • I will go with Trond, what happens if we disable the feature ad user’s have shortcut? i know it will remain heir but will it be effective? let say they delete a file from that shortcut would it still delete he file from the library? Thanks

    Reply
  • Thanks for this!

    How will this setting play out for users that already have added a shorcut to OneDrive? Will the shortcuts be removed, any notifcations? Hard to tell since this setting is only available tenant wide and not possible to test on a site.

    Reply
    • Any folders that have already been added will remain on the user’s computer!

      Reply
  • The other problem shows up when a user adds the shortcut of folder in a library they also have synced to the same PC. The synced library stops syncing without a lot of explanation to the user, and chaos ensues.

    Thanks for sharing this, we may need to use this to prevent these issues.

    Reply
  • Thank you for sharing this! 🙂

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *