Closed JaredRic-MSFT closed 4 years ago
Experiencing same behaviour. Cmdlet fails with "User cannot be found" when Author is unresolvable.
SharePointPnPPowerShellOnline 3.7.1903.0 Installed through the PowerShell Gallery with Install-Module
Same here
Same here
Thanks for providing the clear repro steps. This issue has been fixed and will be released with the March 2020 release. PR #2504 . Closing this issue. In case you're still experiencing issues with the March 2020 release, feel free to reopen this issue.
Hi @JaredRic-MSFT :
Can you please create an issue on https://sharepoint.uservoice.com/forums/329220-sharepoint-dev-platform too? We will merge this fix, but in effect it's a strange behavior of SharePoint. A developer cannot know up front if a user is still available or not. If the user is removed from the Site Users list this error occurs, and effectively the SharePoint CSOM API should return a null value instead of throwing an exception.
Thanks,
/Erwin
getting the same error with todays SharePointPnPPowerShellOnline 3.21.2005.2
@Bjorn80 It's working fine here. Just gave it another test. Does your situation exactly match the steps outlined above?
Notice: many issues / bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:
Apply-SPOProvisioningTemplate
orGet-SPOProvisioningTemplate
? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/officedev/PnP-Sites-Core/issues.Reporting an Issue or Missing Feature
Please confirm what it is that your reporting
When running Get-PnPFile against a file where the Author property is unresolveable (user removed from AAD & User Information List) it fails to return the file due to code in this cmdlet which auto populates the author field.
Expected behavior
Please describe what output you expect to see from PnP-PowerShell Cmdlets
When calling Get-PnPFile it should load the file even if the author field is unresolveable.
Actual behavior
Please describe what you see instead. Please provide samples of HTML output or screenshots
When calling Get-PnPFile it fails with the following error: Get-PnPFile : User cannot be found.
Steps to reproduce behavior
Please include complete code samples in-line or linked from gists
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing
Get-Module -Name *pnppowershell* -ListAvailable
)3.5.1901.0
How did you install the PnP-PowerShell Cmdlets?