MYK-IT Posted November 5, 2021 Posted November 5, 2021 Hi, Hoping that someone can give some assistance / advice as to whether this is feasible (or come up with a better solution!) Department [A] has a specific MS Team, with their departmental staff added as members etc. This is all good, and working OK for them etc. However, they now want to issue personalised folder, containing files to each member of staff (outside their department) that: - Assigned Member of Staff can access (e.g. matches their folder / files) - Department [A] Staff can access (this would be by default anyway due to permissions) - An assigned SLT Member can access - Member of Staff's Line Manager can access - No one else can access On that basis, am I correct in stating that I would have to: - create an initial folder within Department [A]'s Team's SharePoint Site (just to keep all this self-contained, tidy etc!) - create nested-folders for each and every member of staff - for each nested-folder, 'Manage Access' by 'sending link' to: Member of Staff Their Line Manager Assigned SLT Member And repeat this for the 80 or so members of staff? FOLDER [EXAMPLE PROJECT] | - FOLDER [sTAFF 1] {Permissions: Department [A] Staff (Default), Staff 1, Staff 1's Line Manager, SLT Member} | FILES | - FOLDER [sTAFF 2] {Permissions: Department [A] Staff (Default), Staff 2, Staff 2's Line Manager, SLT Member} | | FILES Basically, we just want staff (and their line manager) to be only able to access their personalised folder containing documents to read/edit them etc, and then Department [A] and SLT Staff Member can easily access and review. Ultimately, without inadvertently opening up access to other staff folders, or indeed the rest of the SharePoint Site. Hope I have made sense, and that those who have used SharePoint move intensely than me, are able to help. Thanks.
psydii Posted November 5, 2021 Posted November 5, 2021 I would grant access a slightly different way. The reason I don't recommend the send link option is that it can sometime be a confusing experience and it isn't always clear in the UI who has been granted access to what. That said the process below does send a link by default at the end too. In the individual's folder: Manage Access->Advanced->Inheritance/Break Inheritance Now Grant the staff member and their line manager and the SLT Member the access required. They will be sent a link by default. 1
MYK-IT Posted November 5, 2021 Author Posted November 5, 2021 Thanks @psydii I agree, blocking inheritance would cover, and stop accidental access to other folders or areas of the SharePoint site. I am sure it could all be scripted too, but by the time I am given the list of staff, associated line managers etc. I could probably do manually. Though, if requested similar again in the future I will investigate doing via PowerShell etc.
psydii Posted November 5, 2021 Posted November 5, 2021 Here is something I knocked together for student folders in a SharePoint site, before a MS engineer pointed out that Teams assignments does all this already. You can modify it to suite this task. # Create per user folder in SharePoint Site $SiteName = "SITENAME" $Group = "AZUREADGROUPNAME" $SiteAbsoluteURL = "https://TENANTNAME.sharepoint.com/sites/" + $SiteName $SiteRelativeURL = "/sites/" + $SiteName $listname = "DOCUMENTLIBRARY" $listnameAsRelativeURL = "/" + $listname $FolderServerRelativeURL = $SiteRelativeURL + $listnameAsRelativeURL connect-azuread Connect-SPOService https://TENANTNAME-admin.sharepoint.com Connect-PnPOnline -Url $SiteAbsoluteURL -UseWebLogin new-pnplist -Title $listname -Template DocumentLibrary -OnQuickLaunch $UserList = (Get-AzureADGroup -SearchString $group|Get-AzureADGroupMember) foreach ($user in $UserList) { #write-host $user.givenname $user.surname $studentFolderName = $user.givenname + " " + $user.surname $targetFolder = $FolderServerRelativeURL + "/" + $studentFolderName Write-Host $studentFolderName Write-Host $user.UserPrincipalName Add-PnPFolder -name $studentFolderName -Folder $listnameAsRelativeURL #write-host "Set-PnPFolderPermission -List"+ $listname +"-Identity " + $targetFolder +"-AddRole edit -User " + $user.UserPrincipalName "-ClearExisting" Set-PnPFolderPermission -List $listname -Identity $targetFolder -AddRole edit -User $user.UserPrincipalName -ClearExisting }
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