posts
SharePoint auto-trimming and retention label behavior
I tested SharePoint auto-trimming behavior against files with and without retention labels. The results show that files without a retention label are trimmed as expected, while files with a retention label behave more like retention policy items and keep versions longer.
For non-retention-label files, SharePoint trims old versions once the version count grows. Auto-trimming bypasses the recycle bin and removes older minor/major versions.
However, files with retention labels appear to retain versions instead of trimming them.
posts
SharePoint file metadata updates with Set-PnPListItem and UpdateType
Updating SharePoint file metadata with Set-PnPListItem requires the correct UpdateType. Use SystemUpdate for author and retention label changes, and UpdateOverwriteVersion when updating the editor.
When to use SystemUpdate SystemUpdate updates list item metadata without creating a new version or changing the modified date. It is ideal for author changes or retention label updates. When to use UpdateOverwriteVersion UpdateOverwriteVersion updates metadata and creates a new version. It is required for editor changes because SystemUpdate does not update the editor field reliably.
posts
Power Automate: Check SharePoint File-Level Unique Permissions
Overview Use Power Automate to detect SharePoint files with file-level unique permissions by checking the HasUniqueRoleAssignments property on list items.
REST API query Use the SharePoint REST endpoint to query items and include the fields needed for permissions evaluation.
_api/web/lists/getByTitle('@{item()?['FolderName']}')/items?$select=ID,HasUniqueRoleAssignments,FileRef,FileLeafRef,FileSystemObjectType Method: GET SiteAddress: your SharePoint site Process each item Add an Apply to each action to iterate the results from the REST call.
Set the input to:
@{body('Get_unique_permissions')?['d']['results']} Check unique permissions Add a Condition action inside the loop and test whether the item has unique permissions.