powershell icon indicating copy to clipboard operation
powershell copied to clipboard

[BUG] Get-PnPUser -WithRightsAssigned times out while working with some sites

Open Nazul opened this issue 2 years ago • 11 comments

Expected behavior

Get-PnPUser -WithRightsAssigned should return the list of users with rights assigned.

Actual behavior

Get-PnPUser -WithRightsAssigned times out. image

Steps to reproduce behavior

  1. Connect to a SharePoint site
  2. Run Get-PnPUser -WithRightsAssigned, which fails

Alternate path

  1. Connect to a SharePoint site
  2. Get current context and change timeout value
  3. Get-PnPUser -WithRightsAssigned stills fails after running for about 1:53-1:55 minutes

What is the version of the Cmdlet module you are running?

This was tested with 1.12.0 (Windows PowerShell 5.1) as well as with 2.1.1 (PowerShell 7.3.4)

Which operating system/environment are you running PnP PowerShell on?

  • [X] Windows
  • [ ] Linux
  • [ ] MacOS
  • [ ] Azure Cloud Shell
  • [ ] Azure Functions
  • [ ] Other : please specify

Nazul avatar Jun 05 '23 22:06 Nazul

@Nazul - Can you try on another site? I have no issue on my side (using 2.1.69 nightly)

image

veronicageek avatar Jun 06 '23 15:06 veronicageek

I thought that I mentioned. It doesn't fail with all sites, but just with some. For those where it fails, it fails with both 1.12.0 and 2.1.1 versions.

Nazul avatar Jun 06 '23 15:06 Nazul

In that case it might be more of an issue with the backend, and there are currently some issues with M365 (details in the tenant admin center). If it works even for some sites, not sure we can do anything unfortunately.

veronicageek avatar Jun 06 '23 16:06 veronicageek

We are aware of the Microsoft services outage, however, the issue we described occurred before the outage according to our logs, and it is still there even though SharePoint is listed as fully operational today for our tenant.

The problem that I see related with Get-PnPUser is that we have no way to modify the timeout value, so we can wait longer for the operation to be completed.

Nazul avatar Jun 06 '23 20:06 Nazul

Well, I'll leave @gautamdsheth or @KoenZomers look at it then.

veronicageek avatar Jun 07 '23 13:06 veronicageek

I'm facing same issue. In my case I'm using PowerShell 7.3.7 and PnP.PowerShell 2.2.0 Do we have any news about possible solution?

patritasan avatar Sep 28 '23 06:09 patritasan