In-App UI
React
Hooks
useMsTeamsChannels

useMsTeamsChannels

The useMsTeamsChannels hook is used to retrieve available Microsoft Teams channels for a specific team.

Parameters

#

Accepts an object (UseMsTeamsChannelsParams) with the following properties:

teamIdstring

The ID of the Microsoft Teams team to get channels for.

Returns

#

A UseMsTeamsChannelsReturn object with the following properties:

channelsMsTeamsChannel[]

Array of available Microsoft Teams channels.

isLoadingboolean

Whether channels are being loaded.

errorError | null

Error object if the request failed.

Example

#

Basic usage

#

The following example demonstrates how to use the useMsTeamsChannels hook to display available Microsoft Teams channels.