Majed Fayazi
Majed Fayazi

Reputation: 553

MS Teams channel is hidden when created by MS Graph API request

I have problem, when I create MS team and channels using the MS Graph API, the channels are always hidden and users have to manually click show.

This is the request code to create MS team and two channels:

   $data = [
        'displayName' => 'Test MS Team',
        "[email protected]" => "https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
        'description' => 'Created using MS Graph API v1',
        'channels' => [
            [
                'displayName' => 'Test channel 1',
                'isFavoriteByDefault' => true,
                'description' => 'Test channel 1 descriptions'
            ],
            [
                'displayName' => 'Test channel 2',
                'isFavoriteByDefault' => true,
                'description' => 'Test channel 2 descriptions'
            ]
        ],
        // Adding more than one member is currently not supported on MS graph
        'members' => [
            [
                '@odata.type' => '#microsoft.graph.aadUserConversationMember',
                'roles' => ['owner'],
                '[email protected]' => "https://graph.microsoft.com/v1.0/users('{$this->me()->getId()}')"
            ],
        ]
    ];

    $this->request('POST', '/teams', $data, [], true);

MS Graph docs: Create a team with multiple channels, installed apps, and pinned tabs using delegated permissions

And this is the results:

Channels are hidden

MS Teams with hidden channels

Upvotes: 0

Views: 591

Answers (1)

Dipesh Jadhav
Dipesh Jadhav

Reputation: 58

This feature is controlled by

attribute on the channel, looks like this feature is currently not working and MS has created a bug for it please have a look over here

Upvotes: 1

Related Questions