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 account.

connectionStatus'connected' | 'disconnected' | 'loading'

The current connection status.

errorError | null

Error object if the status check failed.

Example

#

Basic usage

#

The following example demonstrates how to use the useMsTeamsConnectionStatus hook to check Microsoft Teams connection status.