Skip to content

Commit 7e9c930

Browse files
authored
Teams JS Version to use (SharePoint#8381)
* Teams JS Version to use * remove en-us in the url * relative url without view param * Remove crucial; add statement about all SPFx components. * Teams JS SDK info in considerations
1 parent 6e5e456 commit 7e9c930

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

docs/spfx/build-for-teams-considerations.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ SharePoint Framework is meant to extend UI of the services it’s being used wit
3232

3333
SharePoint Framework solutions consist only of client-side code. If your solution requires server-side code for example to run long-running operations, scheduled processes or connecting to other systems that don’t support the OAuth implicit flow, you would need to build this functionality separately and expose it through an API secured with Azure Active Directory. Your SharePoint Framework solution would then [securely connect to this API on behalf of the current user](use-aadhttpclient.md).
3434

35+
## Teams JS SDK
36+
37+
SharePoint Framework provides access to Teams JS SDK via `sdks.microsoftTeams` property in the [context's API](/javascript/api/sp-webpart-base/webpartcontext#@microsoft-sp-webpart-base-webpartcontext-sdks-member).
38+
> [!IMPORTANT]
39+
> Installing and initializing custom versions of Teams JS SDK is **unsupported**. This is applicable to any SPFx component, including web parts, extensions, adaptive cards, and libraries.
40+
3541
## Deployment
3642

3743
SharePoint Online can automatically create the Microsoft Teams app manifest and app package for SharePoint Framework solutions deployed to the tenant's app catalog, or they can use a developer-provided Microsoft Teams app package. Refer to [Deployment options for SharePoint Framework solutions for Microsoft Teams](deployment-spfx-teams-solutions.md) for detail on these options.

docs/spfx/integrate-with-teams-introduction.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,15 @@ this.context.sdks.microsoftTeams
114114
>
115115
> You should use `this.context.sdks.microsoftTeams` for all solutions created with the SharePoint Framework v1.10 and later.
116116
117+
## What Teams JS SDK version to use?
118+
119+
The SharePoint Framework provides access to the Teams JS SDK instance and context using `sdks.microsoftTeams` property in the [context's API](/javascript/api/sp-webpart-base/webpartcontext#@microsoft-sp-webpart-base-webpartcontext-sdks-member).
120+
Using this API assures the supported version of Teams JS is loaded and initialized.
121+
122+
Few details to keep in mind:
123+
- Installing and initializing custom versions of Teams JS SDK is **unsupported**. This is applicable to any SPFx component, including web parts, extensions, adaptive cards, and libraries.
124+
- Although Teams JS SDK types are tied to the SPFx version used in the solution, the actual version loaded to the tenant may differ. We guarantee backward compatibility on our end. For example, a solution built with SPFx 1.14 will have types from Teams JS 1.10.0, and SPFx 1.15.2 will have types from Teams JS 1.12.1, but the actual loaded version can be 2.1.0.
125+
117126
## See also
118127

119128
- [Building Microsoft Teams tab using SharePoint Framework - Tutorial](web-parts/get-started/using-web-part-as-ms-teams-tab.md)

0 commit comments

Comments
 (0)