Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Get a list of groups that is associated to a team
Connect-PnPOnline -ClientId c53eb8da-8bdf-44f9-8718-1fb1bbbbbb `
-Thumbprint EC1E61510AEC35624AF78FEA763D00000000 `
-Tenant "" -Url ""
$token = Get-PnPGraphAccessToken
# Create header with the access token
$header = @{ Authorization = "Bearer $($token)" }
$uri = '' + `
'?$filter=resourceProvisioningOptions/Any(x:x eq ''Team'')' +
# Make a simple rest call
$response = Invoke-RestMethod -Uri $uri -Headers $header -Method Get -ContentType "application/json"
# Lets see the result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment