Skip to content

Instantly share code, notes, and snippets.

@JeffBrownTech
Created April 23, 2020 12:37
Show Gist options
  • Save JeffBrownTech/7513a2307e9511c8f136ce3c93df15b9 to your computer and use it in GitHub Desktop.
Save JeffBrownTech/7513a2307e9511c8f136ce3c93df15b9 to your computer and use it in GitHub Desktop.
Create Graph API Request to Turn M365 Group into a Team
# Create the team request body
$teamBody =
'{
"memberSettings": {
"allowCreateUpdateChannels": true,
"allowDeleteChannels": true,
"allowAddRemoveApps": true,
"allowCreateUpdateRemoveTabs": true,
"allowCreateUpdateRemoveConnectors": true
},
"guestSettings": {
"allowCreateUpdateChannels": true,
"allowDeleteChannels": true
},
"messagingSettings": {
"allowUserEditMessages": true,
"allowUserDeleteMessages": true,
"allowOwnerDeleteMessages": true,
"allowTeamMentions": true,
"allowChannelMentions": true
},
"funSettings": {
"allowGiphy": true,
"giphyContentRating": "strict",
"allowStickersAndMemes": true,
"allowCustomMemes": true
}
}'
$newTeam = Invoke-RestMethod -Uri "https://graph.microsoft.com/v1.0/groups/$($newGroup.id)/team" -Method PUT -Headers $headers -Body $teamBody
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment