Programmatic way to add a shortcut to OneDrive for users?

%3CLINGO-SUB%20id%3D%22lingo-sub-1886184%22%20slang%3D%22en-US%22%3EProgrammatic%20way%20to%20add%20a%20shortcut%20to%20OneDrive%20for%20users%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1886184%22%20slang%3D%22en-US%22%3E%3CP%3EWould%20like%20to%20add%20a%20SharePoint%20document%20library%20shortcut%20to%20our%20users%20OneDrive%20account%20within%20our%20organization.%26nbsp%3B%20%26nbsp%3BThis%20is%20in%20reference%20to%20the%20relatively%20new%20feature%20of%20%22Add%20shortcut%20to%20OneDrive%22.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWould%20like%20to%20do%20this%20automatically.%26nbsp%3B%20Is%20this%20possible%20via%20powershell%20or%20any%20API%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1886184%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOneDrive%20for%20Business%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1918524%22%20slang%3D%22en-US%22%3ERe%3A%20Programmatic%20way%20to%20add%20a%20shortcut%20to%20OneDrive%20for%20users%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1918524%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F868565%22%20target%3D%22_blank%22%3E%40jfergus11%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3EYou%20can%20do%20that%20in%20an%20old%20fashioned%20way%20via%20%3CSTRONG%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fonedrive%2Fuse-group-policy%23configure-team-site-libraries-to-sync-automatically%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EGroup%20Policy%3C%2FA%3E%3C%2FSTRONG%3E%3CBR%20%2F%3EBut%20read%20it%20carefully%2C%20there%20is%20a%20limit%3A%26nbsp%3B%205000%20Files%2Ffolders%20and%201000%20devices%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3EI%20do%20not%20know%2C%20but%20I%20think%20it's%20not%20in%20the%20API%20right%20now.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EIf%20you%20have%20more%20the%201000%20Devices%20(nut%20users!)%20%2C%20you%20have%20to%20do%20it%20as%20described%20below%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBut%20You%20can%20share%20a%20Link%20to%20all%20users%20from%20the%20document%20folder%20of%20the%20SharePoint%20Library%3CBR%20%2F%3EAnd%20the%20inform%20the%20users%2C%20the%20should%20go%20into%20their%20OneDrive%20%2C%20Klick%20on%20Shared%20with%20me.%20Identify%20the%20Folder%2C%20Select%20the%20folder%20and%20the%20click%20on%20Add%20a%20ShortCut%20to%20My%20Files.%20Done%3CBR%20%2F%3E%3CBR%20%2F%3EIs%20that%20too%20much%20for%20the%20users%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1985753%22%20slang%3D%22en-US%22%3ERe%3A%20Programmatic%20way%20to%20add%20a%20shortcut%20to%20OneDrive%20for%20users%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1985753%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F8459%22%20target%3D%22_blank%22%3E%40Hans%20Brender%3C%2FA%3E%20From%20testing%2C%20the%20only%20issue%20I%20see%20is%20that%20the%20group%20policy%20piece%20did%20not%20work%20for%20communication%20sites%2C%20only%20for%20Team%20Sites.%20Can%20you%20confirm%3F%20Also%20no%20PowerShell%20or%20Graph%20API%20yet%3F%20Is%20that%20still%20the%20case%3F%20Thanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1985881%22%20slang%3D%22en-US%22%3ERe%3A%20Programmatic%20way%20to%20add%20a%20shortcut%20to%20OneDrive%20for%20users%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1985881%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F42774%22%20target%3D%22_blank%22%3E%40Liam%20Cleary%3C%2FA%3E%26nbsp%3BSo%20the%20Group%20Policy%20is%20a%20technology%2C%20which%20is%20limited%2C%20because%20this%20is%20the%20root%20folder%20(and%20if%20you%20have%20a%20lot%20of%20documents%20in%20this%20library%2C%20you%20can%20got%20in%20trouble%20with%20too%20many%20files%20(300000%20is%20the%20Limit)%3CBR%20%2F%3E%3CBR%20%2F%3EAdd%20to%20shortcut%20is%20a%20quick%20thing%2C%20each%20person%20will%20do%20manually%20and%20has%20many%20advantages.%3CBR%20%2F%3Eyou%20may%20read%20my%20%3CA%20href%3D%22https%3A%2F%2Fhansbrender.com%2F2020%2F12%2F09%2Fadd-to-onedrive-the-next-step%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Elast%20article%20about%20Add%20to%20OneDrive%3C%2FA%3E%20%2C%20what's%20the%20difference.%3C%2FP%3E%3C%2FLINGO-BODY%3E
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?

Thanks!

4 Replies

@jfergus11 
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.