This post will teach us how to set Item Level Permissions in SharePoint list using the list settings page as well as PnP PowerShell. And also, we can learn how to set item level permission inthe SharePoint list using Power Automate using our previous article – Power Automate[Detailed]: set item level permissions in SharePoint online step by step with HTTP request.
Set Item Level Permissions in the SharePoint list step by step
Go to the list setting page -> Click on Advanced Settings
Item-Level Permissions: By default settings will be as below:
- Read all items
- Create and edit all items
Change the above Item-Level Permissions settings as below:
- Read items that were created by the user.
- Create items and edit items that were created by the user.
Notes:
- Item level permission setting is not available both in the Document Library and Issue Tracking list, so you need to ensure your list is not a type of these two. Using the PowerShell script also we can enable item-level permission for the list, refer to the below PowerShell script.
- Check the permission level of the user on the site and list level. The Item-level permissions configuration is available to those users who have at least design level permission at the site and list level.
Set Item Level Permissions in SharePoint list using PnP PowerShell -SharePoint List Item level permissions missing
Using the below PnP PowerShell script we can set item-level permissions in the SharePoint Online list:
####The below script is used to enable the item-level permission configuration in the SharePoint Online list############# cls $PSshell = Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorVariable err -ErrorAction SilentlyContinue if($PSshell -eq $null) { Add-PSSnapin "Microsoft.SharePoint.PowerShell" } $fileName = "LogEnableItemLevelPermissioninSPOList" #'yyyyMMddhhmm yyyyMMdd $enddate = (Get-Date).tostring("yyyyMMddhhmmss") #$filename = $enddate + '_VMReport.doc' $logFileName = $fileName +"_"+ $enddate+"_Log.txt" $invocation = (Get-Variable MyInvocation).Value $directoryPath = Split-Path $invocation.MyCommand.Path $directoryPathForLog=$directoryPath+"\"+"LogFiles" if(!(Test-Path -path $directoryPathForLog)) { New-Item -ItemType directory -Path $directoryPathForLog #Write-Host "Please Provide Proper Log Path" -ForegroundColor Red } #$logPath = $directoryPath + "\" + $logFileName $logPath = $directoryPathForLog + "\" + $logFileName $isLogFileCreated = $False function Write-Log([string]$logMsg) { if(!$isLogFileCreated){ Write-Host "Creating Log File..." if(!(Test-Path -path $directoryPath)) { Write-Host "Please Provide Proper Log Path" -ForegroundColor Red } else { $script:isLogFileCreated = $True Write-Host "Log File ($logFileName) Created..." [string]$logMessage = [System.String]::Format("[$(Get-Date)] - {0}", $logMsg) Add-Content -Path $logPath -Value $logMessage } } else { [string]$logMessage = [System.String]::Format("[$(Get-Date)] - {0}", $logMsg) Add-Content -Path $logPath -Value $logMessage } } #Paramaters area $siteURL="https://globalsharepoint2020.sharepoint.com/" #Your Site URL should be here. $userName = "YourSPOUser@YourSPOTenant.sharepoint.com" #Your user name should be here. $passWord = "YourSPOPassword" #Your password should be here. $encPassWord = convertto-securestring -String $passWord -AsPlainText -Force $cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $userName, $encPassWord $listName="Employee" #Your list name should be here. #Paramaters area - Ends try { Connect-PnPOnline -Url $siteURL -Credentials $cred #Get the List $objList = Get-PnPList $listName -Includes ReadSecurity #Set List Item-Security $objList.ReadSecurity = 2 #This indicates - Read items that were created by the user. $objList.WriteSecurity = 2 #This indicates - Create items and edit items that were created by the user. $objList.Update() Invoke-PnPQuery } catch { $ErrorMessage = $_.Exception.Message +"in setting item-level permission in SPO list!:" Write-Host $ErrorMessage -BackgroundColor Red Write-Log $ErrorMessage }
Note:
- With the administrator account above PnP PowerShell script should be executed.
Summary: Set Item Level Permissions in the SharePoint list
Thus, in this article we have learned the below:
- How to enable Item-Level Permissions in SharePoint Custom list.
- How to use Item-Level Permissions in SharePoint list.
- Item-Level Permissions default settings.
See Also: SharePoint Online Tutorials
You may also like the below SharePoint Online tutorials:
- Power Automate[Detailed]: set item level permissions in SharePoint online step by step with HTTP request
- Office 365: Getting started with SharePoint PnP PowerShell – installation
- In 2 steps convert a classic SharePoint page to modern using PnP
- Office 365: Retrieve hub sites and associated sites using PnP Powershell
- Create a modern team site using PnP PowerShell in SharePoint
- In 4 steps access SharePoint online data using postman tool
- SharePoint admin center: Learn SharePoint online administration in an hour – step by step
- SharePoint REST API: GET vs POST vs PUT vs DELETE vs PATCH
- Office 365: Understanding the hub site in SharePoint online
- User permissions and permission levels in SharePoint Server
