Created
April 23, 2020 12:37
-
-
Save JeffBrownTech/7513a2307e9511c8f136ce3c93df15b9 to your computer and use it in GitHub Desktop.
Create Graph API Request to Turn M365 Group into a Team
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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