KK20 Posted January 25, 2021 Posted January 25, 2021 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?
gabororsi Posted February 3, 2021 Posted February 3, 2021 If you find a solution tell me, please. I couldn't find it, yet.
psydii Posted February 3, 2021 Posted February 3, 2021 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?
KK20 Posted February 4, 2021 Author Posted February 4, 2021 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).
CamelMan Posted February 4, 2021 Posted February 4, 2021 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.
RobFuller Posted August 18, 2021 Posted August 18, 2021 (edited) Did people find any 'elegant' solutions for teachers accessing student OneDrive's? Edited August 18, 2021 by RobFuller
Boredguy Posted August 18, 2021 Posted August 18, 2021 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 1
free780 Posted August 18, 2021 Posted August 18, 2021 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.
ITGURU Posted August 18, 2021 Posted August 18, 2021 One reason all our data is still local! 365 is clunky for that kind of thing!
Miscbrah Posted Sunday at 12:02 Posted Sunday at 12:02 Ancient bump here, but did anyone ever get a script together that managed to do this?
RobFuller Posted Monday at 08:15 Posted Monday at 08:15 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. 1 1
Miscbrah Posted Monday at 09:01 Posted Monday at 09:01 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now