In-App UI
React
Hooks
useMsTeamsAuth

useMsTeamsAuth

The useMsTeamsAuth hook is used to manage Microsoft Teams authentication for connecting user accounts to Teams workspaces.

Parameters

#

This hook does not accept any parameters.

Returns

#

A UseMsTeamsAuthReturn object with the following properties:

authenticate(options?: MsTeamsAuthOptions) => Promise<void>
Function to initiate Microsoft Teams authentication flow
revokeAccess() => Promise<void>
Function to revoke Microsoft Teams access for the current user
isLoadingboolean
Whether an authentication operation is in progress

Example

#

Basic usage

#

The following example demonstrates how to use the useMsTeamsAuth hook to manage Microsoft Teams authentication.