[FEATURE] Get-PnpProperty RoleAssignments returns many Limited Access entries
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 904
- Forks
- 407
- Avg merge
- 9h 16m
- Merged PRs (30d)
- 10
Description
Is your feature request related to a problem? Please describe.
Feature
Describe the solution you'd like
I would like to see either a dedicated method for Get-PNPRoleAssignments for an object (Web/List/Folder/File/ListItem) or the ability to filter the role assignments returned for permissions on an object so the server doesn't return RoleAssignments with Role Definition binding of LimitedAccess or have the IsHiddenFromUI property on it.
We have a site with WAY too many limited access permissions sitting on the root web thanks to Microsoft's dumb permission granting Sharing Links functionality that was over-used in a site by our users. Now when we run a report to try and gather permissions on items if they have inherited permissions from the site and we make a call for RoleAssignments it returns 50+ limited access entries and hidden from UI entries. Which we then need to filter out.
This is a huge waste of data and processing to remove these when I know that the API call can be passed filters for these if I call it directly. My recommendation would be to have a flag for -IncludeSystemAndLimitedPermissions on the method to include these otherwise hidden and not meaningful to the user a majority of the time permissions.
Describe alternatives you've considered
I could try doing the call myself to query the role assignments but I'm not quite sure how to work with both PNP and rest api at the same time?
Additional context
Add any other context or screenshots about the feature request here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Get-PnPProperty and Get-PNPRoleAssignments entry points, then inspect how object role assignments are retrieved and how the direct API filters LimitedAccess and hidden entries. Done means supporting a method or flag that excludes these entries by default while allowing them to be included when requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100