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 forReturns#
A UseMsTeamsChannelsReturn
object with the following properties:
channelsMsTeamsChannel[]
Array of available Microsoft Teams channelsisLoadingboolean
Whether channels are being loadederrorError | null
Error object if the request failedExample#
Basic usage#
The following example demonstrates how to use the useMsTeamsChannels
hook to display available Microsoft Teams channels.