AboutSupportDeveloper GuideVersion 1.1.0

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

Methods

  • 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

    • url: string

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

    • OptionaltargetIdentity: Identity_4

      The identity of an OpenFin window or view in which to open the URL. If not provided, the URL will be opened in the default browser.

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

    Parameters

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

    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.

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

    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.

    ParameterError if invalid function parameter values are detected.

  • Starts a Teams call to a user or group of users in Teams by providing a list of email addresses or user principal names (UPNs).

    The function attempts to resolve each email address or UPN 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.

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

    • OptionaltargetIdentity: Identity_4

      The identity of an OpenFin window or view in which to start the call. If not provided, the call will be started in the default browser.

    • userPrincipalNames: string[] = []

      List of user principal names (UPNs) of users who should be included in the call. The parameter is ignored if non-empty emailAddresses list is provided.

    Returns Promise<(undefined | UserResult)[]>

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

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

    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.

  • Starts a Teams channel chat or group chat by providing a list of email addresses/user principal names (UPNs) 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 or UPN 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.

    Parameters

    • options: ChannelChatOptions | GroupChatOptions

      Required options for starting a channel chat or a group chat.

    • OptionaltargetIdentity: Identity_4

      The identity of an OpenFin window or view in which to start the chat. If not provided, the chat will be started in the default browser.

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

    When starting a group chat, the returned promise resolves to an array of resolved users indexed as per their email address or UPN provided in the emailAddresses or UPNs parameters. 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.

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

    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.