Programmatic way to add a shortcut to OneDrive for users?

Occasional Visitor

Would like to add a SharePoint document library shortcut to our users OneDrive account within our organization.   This is in reference to the relatively new feature of "Add shortcut to OneDrive".  


Would like to do this automatically.  Is this possible via powershell or any API?


4 Replies

You can do that in an old fashioned way via Group Policy
But read it carefully, there is a limit:  5000 Files/folders and 1000 devices


I do not know, but I think it's not in the API right now.

If you have more the 1000 Devices (nut users!) , you have to do it as described below,


But You can share a Link to all users from the document folder of the SharePoint Library
And the inform the users, the should go into their OneDrive , Klick on Shared with me. Identify the Folder, Select the folder and the click on Add a ShortCut to My Files. Done

Is that too much for the users?

@Hans Brender From testing, the only issue I see is that the group policy piece did not work for communication sites, only for Team Sites. Can you confirm? Also no PowerShell or Graph API yet? Is that still the case? Thanks

@Liam Cleary So the Group Policy is a technology, which is limited, because this is the root folder (and if you have a lot of documents in this library, you can got in trouble with too many files (300000 is the Limit)

Add to shortcut is a quick thing, each person will do manually and has many advantages.
you may read my last article about Add to OneDrive , what's the difference.

@Hans Brender Because of the limitation of the group policy, would like to script it out, as links in OneDrive, almost a pre-provision process. Users will of course add their own as they see fit, but for day one launch, there needs to be a few auto added. Just intrigued to know if API is available to do it yet.