Muokkaa

Jaa


TeamsJS capability support across Microsoft 365

Starting with version 2.0.0, Microsoft Teams JavaScript client library (TeamsJS) enables certain types of Teams apps to run across the Microsoft 365 ecosystem. Microsoft 365 applications that can host Teams apps (Microsoft 365 app and Outlook) support only a subset of the application types and capabilities you can build for the Teams platform. This support expands over time.

This article details the level of support of TeamsJS version 2.x capabilities across various host applications. For more information on what's changed between TeamsJS versions 1.x and 2.x, see What's new in TeamsJS version 2.x.x.

The following TeamsJS Capability table lists TeamsJS capabilities (public namespaces) and their support across Microsoft 365 host applications. Some capabilities are marked with Deprecated or Preview badges, which have the following meanings:

Badge Meaning
Image with the word 'Preview' inside a blue rectangle This capability is in preview and subject to change based on feedback. Don't use this capability in production.
Image with the word 'Deprecated' inside an orange rectangle This capability is deprecated in favor of newer functionality, though it's supported for backwards compatibility purposes. For new apps, use the capability recommended in the usage notes of the deprecated capability.

Microsoft 365 hosts are signified by the product icons in the following table:

Teams Microsoft 365 app Outlook
Microsoft Teams icon Microsoft 365 app icon Microsoft Outlook icon
New Microsoft Teams icon New Microsoft Outlook icon

For more information about the new Teams and Outlook, see Outlook blog and Teams adoption.

Using the following tables, select any TeamsJS Capability for further details including reference docs, samples, usage notes, and limitations.

Note

The information in the following tables is derived from tests conducted with TeamsJS v2.24 and the latest host versions available during testing. Support might vary based on subsequent host modifications. These tables are provided to help you understand capability support across hosts, however, always ensure to use the relevant isSupported() calls in your code to verify support.

Cross-host capabilities

The following table lists host application support for TeamsJS capabilities that can run outside of Teams.


TeamsJS Capability Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
app
appInstallDialog
authentication
calendar
call
chatBadge indicating this capability is in preview
clipboardBadge indicating this capability is in preview
dialogBadge indicating this capability is in preview
geoLocationBadge indicating this capability is in preview
mail
pages
profileBadge indicating this capability is in preview
searchBadge indicating this capability is in preview
secondaryBrowserBadge indicating this capability is in preview

Teams-only capabilities

The following table lists support for TeamsJS capabilities that run only in the Teams environment.


TeamsJS Capability Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
appInitializationBadge indicating this capability is deprecated
locationBadge indicating this capability is deprecated
menus
people
settingsBadge indicating this capability is  deprecated
sharing
stageViewBadge indicating this capability is in preview
tasksBadge indicating this capability is deprecated
teamsCore
videoBadge indicating this capability is in preview
webStorageBadge indicating this capability is in preview

Preview capabilities awaiting host support

Some capabilities in the source are in early preview and still awaiting initial support in one or more host applications that include barCode, media, and meeting.

Later in this article, you can find more information on each capability of the Teams JavaScript client library.

app

Reference | Known issues

Namespace to interact with app initialization and lifecycle.

The app namespace is supported globally across all application hosts and, therefore, doesn't have an isSupported function.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
app

appInitialization

Reference | Known issues

Deprecated. Namespace for initializing an app. For new apps, use app.initialize() from the app capability.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
appInitialization Badge indicating this capability is deprecated

appInstallDialog

Reference | Known issues

Namespace used to open a dialog for installing an application.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
appInstallDialog

authentication

Reference | Known issues

Namespace to interact with the authentication-related part of the library. This module is used for starting or completing authentication flows.

The authentication namespace is supported globally across all application hosts and, therefore, doesn't have an isSupported function.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
authentication

barCode

Reference | Known issues

Preview. Namespace to interact with the barcode scanning-related part of the library.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
barCode Badge indicating this capability is in preview

calendar

Reference | Known issues

Namespace providing calendar-related functionality.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
calendar

call

Reference | Known issues

Namespace providing functionality to start a call with others.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
call

chat

Reference | Known issues

Preview. Namespace providing functionality to start a chat with others.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
chat Badge indicating this capability is in preview

clipboard

Reference

Preview. This capability enables users to copy and paste to the system clipboard.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
clipboardBadge indicating this capability is in preview

dialog

Reference | Known issues

Preview. This group of capabilities enables apps to show modal dialogs (referred as task modules in TeamsJS v1.x). There are two primary types of dialogs: URL-based dialogs and Adaptive Card dialogs. Both types of dialogs are shown on top of your app, preventing interaction with your app while they're displayed.

  • URL-based dialogs allow you to specify a URL from which the contents are shown inside the dialog. For URL dialogs, use the functions and interfaces in the url namespace.
  • Adaptive Card-based dialogs allow you to provide JSON describing an Adaptive Card that is shown inside the dialog. For Adaptive Card dialogs, use the functions and interfaces in the adaptiveCard namespace.

Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
dialog Badge indicating this capability is in preview
dialog.adaptiveCard Badge indicating this capability is in preview
dialog.adaptiveCard.bot Badge indicating this capability is in preview
dialog.updateBadge indicating this capability is in preview
dialog.urlBadge indicating this capability is in preview
dialog.url.botBadge indicating this capability is in preview

dialog.adaptiveCard

Reference | Known issues

Preview. Subcapability for interacting with Adaptive Card dialogs.

dialog.adaptiveCard.bot

Reference | Known issues

Preview. Subcapability for interaction with Adaptive Card dialogs that need to communicate with the Bot Framework.

dialog.update

Reference | Known issues

Preview. Namespace for updating dialogs.

dialog.url

Reference | Known issues

Preview. Subcapability for interacting with HTML-based dialogs.

dialog.url.bot

Reference | Known issues

Preview. Subcapability for interacting with HTML-based dialogs that need to communicate with the Bot Framework.

geoLocation

Reference | Known issues

Preview. Namespace providing location-related functionality. This is the newer version of the location module.

Capabilities that require the user to grant device permissions (such as geoLocation) are partially supported for apps running outside of Teams. Users can adjust app permissions from the app header when running in Outlook and Microsoft 365 app, or from app settings on mobile. It's recommended to modify your code to check Outlook and Microsoft 365 supportability:

  • Call isSupported on a capability before using it.
  • Catch and handle errors when calling TeamsJS and HTML5 APIs

When an API doesn't support or generates an error, add logic to fail or provide a workaround. For example:

  • Direct the user to your app's website
  • Direct the user to use the app in Teams to complete the flow
  • Notify the user that the functionality isn't yet available

Tip

Ensure your app manifest only specifies the device permissions it's using.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
geoLocation Badge indicating this capability is in preview
geoLocation.map Badge indicating this capability is in preview

geoLocation.map

Reference | Known issues

Preview. Subcapability providing map-related functionality.

location

Reference | Known issues

Deprecated. Namespace providing location-related functionality (get and show location). Use geoLocation for new apps.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
location Badge indicating this capability is deprecated

mail

Reference | Known issues

Namespace providing email-related functionality.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
mail

media

Reference | Known issues

Namespace providing image file-related functionality.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
media

meeting

Reference | Known issues

Namespace providing in-meeting app functionality.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
meeting

Note

The following methods aren't supported on the Teams mobile client:

  • meeting.requestStartLiveStreaming
  • meeting.requestStopLiveStreaming
  • meeting.getLiveStreamState
  • meeting.registerLiveStreamChangedHandler

Reference | Known issues

Namespace to interact with the menu-related part of the library. This module is used to show View Configuration, Action Menu, and Navigation Bar Menu.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
menus

pages

Reference | Known issues

Navigation-related part of the TeamsJS library.

Prior to TeamsJS version 2.0, all deep linking scenarios were handled using shareDeepLink (to generate a link to a specific part of your app) and executeDeepLink (to navigate to a deep link from or within your app). TeamsJS v.2.0 introduces a new API, navigateToApp, for navigating to pages (and subpages) within an app in a consistent way across app hosts (Microsoft 365 app and Outlook, in addition to Teams). For new apps, follow the linked updated guidance depending on your navigation scenario:

  • Deep links into your app. Use pages.shareDeepLink (known as shareDeepLink prior to TeamsJS v.2.0) to generate and display a copyable link for the user to share. When selected, the user is prompted to install the app if it's not already installed for the application host.

  • Navigation within your app. Use the new pages.currentApp namespace to navigate within your app within the hosting application. Specifically, the function navigateTo(NavigateWithinAppParams) to allow navigation to a specific tab within the current app and the function navigateToDefaultPage() to navigate to the first tab defined in the app's manifest. For more information, see navigate within a tab app.

    These APIs provide the equivalent of navigating to a deep link (as the now deprecated executeDeepLink was once used for) without requiring your app to construct a URL or manage different deep link formats for different application hosts.

  • Deep links out of your app. For deep links from your app to various areas of its current host, use the typed APIs provided by the TeamsJS library. For example, use the calendar capability to open a scheduling dialog or calendar item from your app.

    For deep links from your app to other apps running in the same host, use pages.navigateToApp.

    For any other external deep linking scenarios, you can use app.openLink, which provides similar functionality to the now deprecated (starting in TeamsJS v.2.0) executeDeepLink API.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
pages
pages.appButton
pages.backStack
pages.currentApp
pages.config
pages.tabs

Note

The following methods aren't supported on the Teams mobile client:

  • pages.getConfig
  • pages.setCurrentFrame
  • pages.initializeWithFrameContext
  • pages.tabs.navigateToTab
  • pages.tabs.getMruTabInstances
  • pages.tabs.getTabInstances

pages.appButton

Reference | Known issues

Provides APIs to interact with the app button part of the SDK.

pages.backStack

Reference | Known issues

Provides APIs for handling the user's navigational history.

pages.config

Reference | Known issues

Provides APIs to interact with the configuration-specific part of the SDK. This object is usable only on the configuration frame.

pages.currentApp

Reference | Known issues

Provides functions for navigating without needing to specify your application ID.

pages.tabs

Reference | Known issues

Provides APIs for querying and navigating between contextual tabs of an application. Unlike personal tabs, contextual tabs are pages associated with a specific context, such as channel or chat.

people

Reference | Known issues

Namespace providing functionality for People Picker API.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
people

profile

Reference | Known issues

Preview. Namespace providing for profile-related functionality.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
profile Badge indicating this capability is in preview

Note

The profile.showProfile method isn't supported on the Teams mobile client.

Reference | Known issues

Preview. Allows your application to interact with the host Microsoft 365 application's search box. By integrating your application with the host's search box, users can search your app using the same search box they use elsewhere in Teams, Outlook, or Microsoft 365 app.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
search Badge indicating this capability is in preview

secondaryBrowser

Reference | Known issues

Preview. Namespace supporting in-app browser experiences of the host app. For example, opening a URL in the host app inside a browser.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
secondaryBrowser Badge indicating this capability is in preview

settings

Reference | Known issues

Deprecated. Provides settings-related functionality. Use equivalent APIs from the pages for new apps.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
settings Badge indicating this capability is deprecated

sharing

Reference | Known issues

Namespace to open a share dialog for web content. For more information, see Share to Teams from personal app or tab.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
sharing

Note

The sharing.shareWebContent method isn't supported on the Teams mobile client.

stageView

Reference | Known issues

Preview. Namespace to interact with the Stageview specific part of the library.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
stageView Badge indicating this capability is in preview

tasks

Reference | Known issues

The earlier version of the capability for providing modal dialogs (referred as task modules in TeamsJS v1.x) supports versions prior to TeamsJS v2.8.0. For new apps, use the dialog capability.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
tasks Badge indicating this capability is deprecated

Note

The task.getDefaultSizeIfNotProvided method isn't supported on the Teams mobile client.

teamsCore

Reference | Known issues

Namespace containing the set of APIs that support Teams-specific functionalities.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
teamsCore

video

Reference | Known issues

Preview. Namespace representing functionality for in-meeting video effects.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
video Badge indicating this capability is in preview

Note

The following methods aren't supported on the Teams mobile client:

  • video.notifySelectedVideoEffectChanged
  • video.registerForVideoEffect

webStorage

Reference | Known issues

Preview. Contains functionality to allow web apps to store data in webview cache.


Web Desktop Mobile
Windows Android iOS
Teams Teams (New) Microsoft 365 app Outlook Teams Teams (New) Microsoft 365 app Outlook Outlook (New) Teams Microsoft 365 app Outlook Teams Microsoft 365 app Outlook
webStorage Badge indicating this capability is in preview

Note

The webStorage.isWebStorageClearedOnUserLogOut method isn't supported on the Teams mobile client.

See also