Repository navigation
Getuserassignedrights. Fix for bug #5477 - #5509
Open
reshmee011 wants to merge 4 commits into
Open
reshmee011 wants to merge 4 commits into
reshmee011 wants to merge 4 commits into
Conversation
5 tasks
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The catch suppresses connection failures and exhausted retries as warnings, allowing incomplete permissions reports without honoring callers’ -ErrorAction Stop expectations.
1 open issue
What changed in this PR
This PR attempts to address #5477 by allowing Get-PnPUser -WithRightsAssignedDetailed to continue when processing an individual list item fails.
Changes:
- Wraps per-item permission retrieval in a
try/catch. - Logs the item, list, site, and exception message as a warning before continuing.
| File | Description |
|---|---|
src/Commands/Principals/GetUser.cs |
Adds per-item exception handling during detailed permission enumeration. |
Review effort: Balanced
| } | ||
| catch (Exception ex) | ||
| { | ||
| LogWarning(string.Format("Error while enumerating listitem {0} in list {1} in site {2} with error {3}", listItem.Id, list.RootFolder.ServerRelativeUrl, CurrentWeb.Url, ex.Message)); |
Collaborator
There was a problem hiding this comment.
@reshmee011 - any thoughts on this ? Seems like a valid comment, though am not sure if it might be a breaking change or something ?
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Type
What is in this Pull Request ?
A try catch while enumerating through list items to see if it helps fixing the issue.