In-App UI
React
Hooks
useMsTeamsConnectionStatus
useMsTeamsConnectionStatus
The useMsTeamsConnectionStatus
hook is used to check the current Microsoft Teams connection status for a user.
Parameters#
This hook does not accept any parameters.
Returns#
A UseMsTeamsConnectionStatusReturn
object with the following properties:
isConnectedboolean
Whether the user has a connected Microsoft Teams accountconnectionStatus'connected' | 'disconnected' | 'loading'
The current connection statuserrorError | null
Error object if the status check failedExample#
Basic usage#
The following example demonstrates how to use the useMsTeamsConnectionStatus
hook to check Microsoft Teams connection status.