Wednesday, November 29, 2017

Remove "Access Requests" without any email sending to the users

Remove "Access Requests" without any email sending to the users.


There is no deletion option in browser UI, howeever There are two ways you can work with this.

1. Using SharePoint Designer

Need to add AllItems.aspx view using SharePoint Designer, deleting requests one by one would’ve taken very long time, as while the All Items view allowed me to select multiple rows, there was no Delete button in any toolbar nor ribbon.

 Reference Link : http://johnlearnt.blogspot.com/2014/07/how-to-delete-access-request.html

2. Powershell Script

$web = Get-SPWeb https://sharepoint.com/sites/siteA
$items = $web.Lists["Access Requests"].Items
while($items.Count -gt 0)
{
    Write-Host "Deleting: $($items[0].Title)"
    $items[0].Delete()
}

Happy scripting :)

No comments:

Post a Comment