Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 788 Bytes

File metadata and controls

24 lines (17 loc) · 788 Bytes
description Automatically generated file. DO NOT MODIFY
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\Channel;
use Microsoft\Graph\Beta\Generated\Models\ChannelMembershipType;
use Microsoft\Graph\Beta\Generated\Models\ChannelLayoutType;


$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);

$requestBody = new Channel();
$requestBody->setDisplayName('Project Collaboration');
$requestBody->setDescription('Discussion space for project team collaboration');
$requestBody->setMembershipType(new ChannelMembershipType('standard'));
$requestBody->setLayoutType(new ChannelLayoutType('chat'));

$result = $graphServiceClient->teams()->byTeamId('team-id')->channels()->post($requestBody)->wait();