Jump to content

Recommended Posts

Posted

I want teachers to be able to access pupil onedrive accounts. I have a script that accomplishes this using a combination of Get-MsolGroupMember for my staff and pupil groups. Then get a list of my sharepoint profiles GetUserProfileByIndex cross referencing them with pupil accounts. I can then loop these with get-SPOUser -Site $SPuserURL -LoginName $ADStaffGroupMember -IsSiteCollectionAdmin $true. This works but is reallllllly slooooooooow for 80 staff against 500 pupils. It is roughly 30 seconds per pupil.

 

Is there a way to do this in "bulk" via CSV? I know you can create sites via CSV but what about updating them? Or is there a better way of doing this?

  • 2 weeks later...
Posted
I did this using a group rather than granting per user. It was so long ago I can't find the script, but the above seems familiar, perhaps it will take the group-email as the -user property?
Posted

I looked at using a group but since the admin screen said "groups are not supported" I didnt continue. In the end I used module pnp.powershell, this works well but is slow. A combination of get-msolgroup for my group members then set-pnptenantsite with a list of -owners

 

what you WILL run into is 429 throttling errors if you dont have a handler for throttling. This is a lot of individual calls so you are better artificially slowing it down. Ideally I would like a graph solution (and automate it) but havent yet found one.

 

I have adapted my script to also update static teams from group membership (we dont have premium azure so I cant use dynamic groups).

Posted
Jumping outside of Powershell - I did see something called "Teacher desk" or similar that was a plug in for O365. This was a few years ago but offered a GUI for staff to access the student OneDrive accounts. It was free when I looked at it up to a certain number of teachers.
  • 6 months later...
Posted

Our "Elegant" solution is for students to share specific folders with staff if required

According to our AUP/Staff handbook, the only people than can access staff or student areas is IT Support

  • Thanks 1
Posted
I haven’t got the time to play with it but I wondered if the the MS Graph could add the site collection admin. You can addd groups but it is fiddly. I seem to remember doing it via the web gui and then using the get command to get the right reference for the group.
  • 5 years later...
Posted

We use Salamander for this, so it wasn't too much of a burden from a time perspective. Permissions are applied during the account creation and provisioning process.

To make access easier for staff, I also created a SharePoint web part with the help of Claude, using the Microsoft Graph API. It presents a searchable directory of students and allows staff to open the relevant OneDrive directly. It's been working really well and has significantly simplified the process for our users.

  • Like 1
  • Thanks 1
Posted

Thanks. This end (with the help of CoPilot and some googling) I've knocked up a script that makes urls (in a local .html file) for teachers to click, and something else (that I have to run manually until I figure out the auth token thing) that assigns the permissions of the OneDrives by url for each student in %group%. It's working. It's less graceful than your approach but it's working.

 

We're going with Salamander ultimately but couldn't get in before the start of the year. A very large part of the appeal is that I won't then have to nurse a set of scripts through updates and retired modules and all that every September.

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