Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Get-PnPMicrosoft365Group -IncludeSiteUrl -IncludeOwners errors due to token expiration on tenants with 4K+ M365 Groups #4051

Open
1 of 6 tasks
joerodgers opened this issue Jun 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@joerodgers
Copy link

Reporting an Issue or Missing Feature

Due to the access token being passed in as a string to the Microsoft365GroupsUtility.GetGroupsAsync function, on large tenants the operation can take several minutes to complete, sometimes exceeding the expiration time of the provided (stale?) access token.

Get-PnPMicrosoft365Group -IncludeSiteUrl -IncludeOwners

Expected behavior

The cmdlet will automatically refresh any expired access tokens and allow the operation to succeeded. I potential short term option would be to force a token refresh before passing it over to Microsoft365GroupsUtility.GetGroupsAsync, allowing a much longer period of time before token expiration.

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

1.12.0

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

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify
@joerodgers joerodgers added the bug Something isn't working label Jun 27, 2024
@gautamdsheth
Copy link
Collaborator

@joerodgers - can you please try with the latest version and let us know ? Its quite old and the latest version is 2.4.0 which has quite a few changes and updates.

@tomtorggler
Copy link

I might have the same issue, Get-PnPMicrosoft365Group hangs when I use the switch -IncludeSiteUrl.

I tried 2.5.0 and 2.5.4-nightly on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants