Docs
/
In-App UI
React
Hooks
useMsTeamsTeams

useMsTeamsTeams

The useMsTeamsTeams hook is used to retrieve available teams within a Microsoft Teams-enabled Microsoft Entra tenant. This hook must be used within a KnockMsTeamsProvider.

Parameters

#

Accepts an object with the following properties:

queryOptionsMsTeamsTeamQueryOptions

Optional query options for filtering, pagination, and field selection.

Returns

#

Returns an object with the following properties:

dataMsTeamsTeam[]

Array of available Microsoft Teams.

isLoadingboolean

Whether teams are being loaded or revalidating.

refetch() => void

Function to manually refetch the teams.

Example

#

Basic usage

#

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

With query options

#

You can customize the query with pagination and filtering options: