Sean Regan's Development Blog
A resource for tips and solutions involving SharePoint and .NET Development
Thursday, June 11, 2020
Grant access to an item or folder: Add a SharePoint Group
In Power Automate, if trying to grant access to an item or a folder, and you try to use a SharePoint Group, it won't resolve and you'll get an error that the field is required.
But if you just Initialize a variable and assign it the name of the SharePoint Group:
And then use that variable instead:
You no longer get an error, and the group will get added with the access level specified when you run the flow!
Monday, June 8, 2020
Get-PnPListItem in a list with greater than 5000 items
If you need to grab all the items from a list with greater than 5000 items in SharePoint Online, you might get the following error:
The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator
To get around that, add a query with the scope of RecursiveAll to your query like so:
Connect-PnpOnline -Url 'https://vivity.sharepoint.com/sites/sitename' -Credentials (Get-Credential)
$query = "<View Scope='RecursiveAll'><RowLimit>5000</RowLimit></View>"
$items = Get-PnPListItem -List 'My List' -Query $query