FunctionsPublic/New-GraphTeam.ps1

    function New-GraphTeam
{
    param([psobject]$accessToken, [string]$groupID)
    #
    # Create new unified group
    #
    $sendBody = @{
        "funSettings"= @{ "allowGiphy"="true"; "giphyContentRating"="strict" };
        "memberSettings"= @{ "allowCreateUpdateChannels"="false"; "allowDeleteChannels"="false" };
        "guestSettings"= @{ "allowCreateUpdateChannels"="false"; "allowDeleteChannels"="false" }
        } | ConvertTo-Json 
    
    $responseBody = Invoke-RestMethod `
        -Uri "https://graph.microsoft.com/v1.0/groups/$($groupID)/team" `
        -Headers @{"Authorization" = "Bearer $($accessToken.AccessTokenCredential.GetNetworkCredential().password)"} `
        -Body $sendBody `
        -ContentType "application/json" `
        -Method PUT

    $jsonResponse = $responseBody | ConvertTo-JSON

    $createdTeam = ConvertFrom-Json -InputObject $jsonResponse

    return $createdTeam
}