Replies: 1 comment
-
You can use: Then filter the results based on GroupId of the sites. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
in a script, i needed to get the siteurl for a team. I'm a global admin, but was not part of the team.
I used Get-PnpTeamsTeam to get the team, not problem there.
Then I used Get-PnPMicrosoft365Group -Identity $Team.GroupId -IncludeSiteUrl
That works fine when you're part of the group. But when I'm not part of that group, it takes a long time, and eventually it errors with access denied.
In the end, I created a workaround by connecting with Teams (Connect-MicrosoftTeams), where I added myself as owner to the Team using Add-TeamsUser.
Apparently, the microsoft modules do not seem to have this issue, as they also check the permissions I get through admin roles.
Beta Was this translation helpful? Give feedback.
All reactions