Resetting Item level permissions RRS feed

  • Question

  • Hi Team,

    I have a list with 3 LACS iteam with unique pemissions. I was not able to to any modification in 2K list items. When started investigation i identified that permissions were corrupted for those all 2K list items.

    I was able to solve this issue for 1800 list items by using article

    But still i can see this issue with 200 items. Not sure what is wrong with my stored procedure which executed in a certain time of interval to fix this.

    Do we have any other way to fix this issue so that i could do some changed into that list item ?

    How can i fix this issue for those 200 items ?

    I see there we have below power shell to repair this issue but as per my reading powershell deletes those corrupted items from database.

    $databases = Get-SPContentDatabase
    $databases | %{ $_.Repair($false) }


    Thursday, August 22, 2019 11:17 AM

All replies

  • the above command will not delete the corrupted items from database, it will only remove if you provide $true instead of $false. you can also check for all content databases as well.

    if ((Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null )
    {Add-PSSnapin Microsoft.SharePoint.Powershell}
    $CDBs = Get-SPContentDatabase
    ForEach ($CDB in $CDBs)
    Write-Host “Detecting Orphans for ” $CDB.Name

    Below article for your reference:

    Thanks & Regards,

    sharath aluri

    Thursday, August 22, 2019 1:42 PM
  • Hi Sharath,

    Thanks for your reply. I agree above statement will delete when varue is true.

    But does this statement repairs the corrupted items when value is false ? I mean ti say : 


    I am not sure if it will fix the permission for those items ? Will it ?

    Friday, August 23, 2019 5:54 AM
  • Hi ,

    You could check the thread shared by Nishant Shah.

    Backup the database before executing the script.

    Best Regards,


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Friday, August 23, 2019 6:00 AM
  • Yes it will repair when the value is $false. you can the article that I & Lee sent.

    Thanks & Regards,

    sharath aluri

    Friday, August 23, 2019 12:55 PM
  • Hi All,

    Thank yo so much for your suggestions.  I tried the stored procedure provided by microsoft , as well as below powershell command to repair issue with those list items.

    if ((Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null )
    {Add-PSSnapin Microsoft.SharePoint.Powershell}
    $CDBs = Get-SPContentDatabase
    ForEach ($CDB in $CDBs)
    Write-Host Detecting Orphans for  $CDB.Name

    But still it is not helpfully for me. any idea where am i wrong om this. I run above powershell with service account.

    Note : I do not want to delete those list items. I only wanted to repair them.


    Thursday, August 29, 2019 6:09 AM
  • Hi All,

    On top of my above information , adding more finding here :

    I am trying to reset the permission using below article to solve this issue.

    Here is the stored procedure provided by microsoft to reset the corrupted permissions .


    USE [WSS_Content]

    GODECLARE @return_value int,
    @NewScopeId uniqueidentifier,
    @RequestGuid uniqueidentifier

    EXEC @return_value = [dbo].[proc_SecResetItemPerm]
    @SiteId = ‘9f07b6ef-25e1-4a7a-b06e-f60019e20255’,
    @WebId = ‘c3536be5-a419-4c27-88fd-269316c18757’,
    @OldScopeId = ‘B2D7B4C0-8E02-4E5F-A611-020BE5770A8F’,
    @Url = N’web/list/16855_.000′,
    @DocId = ‘fab7dc68-50ad-4ea0-9c99-230dfdbc0567′,
    @NewScopeId = @NewScopeId OUTPUT,
    @RequestGuid = @RequestGuid OUTPUT

    SELECT @NewScopeId as N’@NewScopeId’,
    @RequestGuid as N’@RequestGuid’

    SELECT ‘Return Value’ = @return_value


    But when i crossvarified the database , found @OldScopeId  variable is Null for all those corrupted list items.

    Can any one have any idea to proceed ahead on this issue ?


    Thursday, August 29, 2019 7:29 AM