Hierarchy

  • TeamsConnection

Constructors

  • Provides functionality for integrating an OpenFin app with Microsoft Teams.

    Parameters

    • ms365Connection: Microsoft365Connection

      Existing connection to Microsoft 365 to use.

    • useMsTeamsProtocol: boolean = true

      Determines whether the msteams protocol is used for deep linking to the Teams application, otherwise standard https links are used (defaults to true).

    Returns TeamsConnection

Properties

logger: Logger
unsubscribeIntentHandlers?: (() => Promise<void>)

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

useMsTeamsProtocol: boolean

Methods

  • Returns Promise<void>

  • Opens a URL that was retrieved from a Teams endpoint of the Graph API, whilst respecting the value provided for the useMsTeamsProtocol constructor parameter.

    Parameters

    • webUrl: string

      A web URL that was retrieved from a Teams endpoint of the Graph API.

    Returns Promise<void>

  • Shares a chart or financial instrument price information to a Teams channel chat or group chat, appearing as an adaptive card in the chat.

    Teams users who see the message can click the button in the message which will open the originating OpenFin app and raise a relevant intent, namely ViewChart (when a chart is shared) or ViewInstrument (when instrument price information is shared).

    Returns

    When sharing to a group chat, the returned promise resolves to an array of resolved users indexed as per their email address provided in the emailAddresses parameter. If any user could not be resolved, undefined is returned at the corresponding index instead. Alternatively, when sharing to a channel chat, the returned promise resolves to an object describing the resolved team and channel. If the IDs provided do not resolve to an existing team/channel then the promise will resolve with undefined.

    Throws

    ApiRequestError if an error occurred when sending a Graph API request, or if the Graph API responded with an error HTTP response code.

    Throws

    AuthTokenExpiredError if the current access token has expired and cannot be renewed. In this instance, you must re-connect before continuing to use this API.

    Throws

    ParameterError if invalid function parameter values are detected.

    Parameters

    Returns Promise<undefined | TeamChannelResult | (undefined | UserResult)[]>

  • Starts a Teams call to a user or group of users in Teams by providing a list of email addresses.

    The function attempts to resolve each email address provided to a user in the connected Azure AD tenant, so only internal or guest users are supported by this function.

    The call will include only those users that were resolved successfully. If no users were resolved then the call will not be started.

    Returns

    An array of resolved users indexed as per their email address provided in the emailAddresses parameter. If any user could not be resolved, undefined is returned at the corresponding index instead.

    Throws

    ApiRequestError if an error occurred when sending a Graph API request, or if the Graph API responded with an error HTTP response code.

    Throws

    AuthTokenExpiredError if the current access token has expired and cannot be renewed. In this instance, you must re-connect before continuing to use this API.

    Parameters

    • emailAddresses: string[] = []

      List of email addresses of users who should be included in the call.

    • withVideo: boolean = false

      Determines whether the caller’s camera will be turned on when making the call (defaults to false).

    Returns Promise<(undefined | UserResult)[]>

  • Starts a Teams channel chat or group chat by providing a list of email addresses or team/channel IDs.

    When starting a channel chat, if the team/channel IDs provided do not resolve to an existing team/channel then the chat will not be started and the function will resolve with undefined.

    When starting a group chat, the function attempts to resolve each email address provided to a user in the connected Azure AD tenant, so only internal or guest users are supported by this function. The group chat will include only those users that were resolved successfully. If no users were resolved then the chat will not be started.

    Returns

    When starting a group chat, the returned promise resolves to an array of resolved users indexed as per their email address provided in the emailAddresses parameter. If any user could not be resolved, undefined is returned at the corresponding index instead. When starting a channel chat, the returned promise resolves to an object describing the resolved team and channel. If the IDs provided do not resolve to an existing team/channel then the promise will resolve with undefined.

    Throws

    ApiRequestError if an error occurred when sending a Graph API request, or if the Graph API responded with an error HTTP response code.

    Throws

    AuthTokenExpiredError if the current access token has expired and cannot be renewed. In this instance, you must re-connect before continuing to use this API.

    Parameters

    Returns Promise<undefined | TeamChannelResult | (undefined | UserResult)[]>

Generated using TypeDoc