Jump to content

Recommended Posts

Posted

Hi All,

 

I have found a working solution to create shortcuts in a users OneDrive to SP Libraries which removes the need to have users do it themselves. I need to be able to automate this to only run for users in a group in Office 365, I have tried everything but just need it to run for all users in a certain group. The code connects to MS Graph API and does its magic there and then If I run this New-OneDriveShortcut -Uri "https://farno365.sharepoint.com/sites/ITSupport" -DocumentLibrary "TestLib" -UserPrincipalName "[email protected]" it runs fine for when specifying the users email but not a great solution when there are 200 users in a group.

 

All help most appreciated!

Posted
Do your users sign into school / work computers? I’ve got group policy setup to create Desktop, Document etc folders in everyone’s OneDrive folders. You could do the same to deploy a shortcut to a specific user OneDrive folder, targeted to a user security group.
Posted
Yes they do, that would probably be the way to go but we used a similar thing in the past never worked. Wanting a script to use the code I provided and run for each user in a security group. I have tested the code and does exactly what I want but cant figure out how to make it apply for everyone in a group.
Posted

So yeah Group Policy works (in the most part) if your users use a Windows Machine to access their "stuff" now more than ever users may never touch what I will call classic devices to access their "stuff" so this lays waste to some of those classic administrative tools like group policy.

 

So yeah the brave new world it is then as we have users who will never touch a windows devices and have to come up with automation in the cloudy world. As @chaplic has said if this group exists in the cloud then you can poke the graph api for the membership of the group, if its an on prem AD group then get it synced so you can poke the graph api! The graph explorer is your freind here: https://developer.microsoft.com/en-us/graph/graph-explorer

  • 7 months later...
Posted
Hi All,

 

I have found a working solution to create shortcuts in a users OneDrive to SP Libraries which removes the need to have users do it themselves. I need to be able to automate this to only run for users in a group in Office 365, I have tried everything but just need it to run for all users in a certain group. The code connects to MS Graph API and does its magic there and then If I run this New-OneDriveShortcut -Uri "https://farno365.sharepoint.com/sites/ITSupport" -DocumentLibrary "TestLib" -UserPrincipalName "[email protected]" it runs fine for when specifying the users email but not a great solution when there are 200 users in a group.

 

All help most appreciated!

 

Hi Zak,

how did you manage to add shortcut to all users onedrive? I've been trying to do this but no joy 😒

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...