# @microsoft/teams-js

> Microsoft Client SDK for building app for Microsoft hosts

Latest version **2.58.0** (published 2026-10-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @microsoft/teams-js
pnpm add @microsoft/teams-js
yarn add @microsoft/teams-js
bun add @microsoft/teams-js
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.58.0 |
| Published | 2026-10-07 |
| First published | 2018-04-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Microsoft Teams |
| Maintainers | microsoft1es, microsoft-oss-releases, vsrdomain, hexteam |

## Links

- npm: https://www.npmjs.com/package/@microsoft/teams-js
- Repository: https://github.com/OfficeDev/microsoft-teams-library-js
- Homepage: https://github.com/OfficeDev/microsoft-teams-library-js#readme
- Issues: https://github.com/OfficeDev/microsoft-teams-library-js/issues
- npm.io page: https://npm.io/package/@microsoft/teams-js

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^4.3.3
- [base64-js](https://npm.io/package/base64-js.md) ^1.3.1

## Recent versions

- 2.58.0 (latest) — 2026-10-07
- 2.59.0-beta.0 (beta) — 2026-10-16
- 1.13.1 (v1latest) — 2023-04-06
- 2.0.0-experimental.1 (experimental) — 2022-07-18
- 2.1.0-beta.0 (next-dev) — 2022-06-10
- 2.0.0-beta.7 (next) — 2022-05-12
- 1.12.0-dev.2 (dev) — 2021-11-26
- 2.57.0 — 2026-09-24
- 2.57.0-beta.0 — 2026-09-16
- 2.56.0 — 2026-09-02
- 2.55.1-beta.0 — 2026-08-26
- 2.55.0-beta.0 — 2026-08-12
- 2.55.0 — 2026-08-05
- 2.54.0-beta.0 — 2026-07-22
- 2.54.0 — 2026-07-15
- … 551 more at https://npm.io/package/@microsoft/teams-js/versions

## README

# Microsoft Teams JavaScript client library

Welcome to the Teams JavaScript client library! For breaking changes, please refer to our [changelog](./CHANGELOG.md) in the current `<root>/packages/teams-js` directory.

This JavaScript library is part of the [Microsoft Teams developer platform](https://learn.microsoft.com/microsoftteams/platform/). See full [library reference documentation](https://learn.microsoft.com/javascript/api/overview/msteams-client?view=msteams-client-js-latest).

## Getting Started

See [instructions](../../README.md#Getting-Started) in the monorepo root for how to clone and build the repository.

Whenever building or testing the Teams client library, you can run `pnpm build` or `pnpm test` from the packages/teams-js directory.

## Installation

To install the stable [version](https://learn.microsoft.com/javascript/api/overview/msteams-client?view=msteams-client-js-latest):

### npm

`npm install --save @microsoft/teams-js`

### pnpm

`pnpm add @microsoft/teams-js`

### Production

You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.58.0/js/MicrosoftTeams.min.js) or point your package manager at them.

## Usage

### As a package

Install either using npm or pnpm.

**If you are using any dependency loader** such as [RequireJS](http://requirejs.org/) or [SystemJS](https://github.com/systemjs/systemjs) or module bundler such as [browserify](http://browserify.org/), [webpack](https://webpack.github.io/), you can use `import` syntax to import specific modules. For e.g.

```typescript
import { app } from '@microsoft/teams-js';
```

### As a script tag

Reference the library inside of your `.html` page using:

```html
<!-- Microsoft Teams JavaScript API (via CDN) -->
<script
  src="https://res.cdn.office.net/teams-js/2.58.0/js/MicrosoftTeams.min.js"
  integrity="sha384-sMo/EOqQPa1OCup2/VBRum7oFeOS22kvs8WGDc45xK53tUVZzFR5WwFYDUYN1LO4"
  crossorigin="anonymous"
></script>

<!-- Microsoft Teams JavaScript API (via npm) -->
<script src="node_modules/@microsoft/teams-js@2.58.0/dist/MicrosoftTeams.min.js"></script>

<!-- Microsoft Teams JavaScript API (via local) -->
<script src="MicrosoftTeams.min.js"></script>
```

### Dependencies

Teams client library depends on [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) type. If you support older browsers and devices which may not yet provide it natively (e.g. IE 11), you need to provide a global polyfill, such as [es6-promise](https://www.npmjs.com/package/es6-promise), in your bundled application. If you're using a script tag to reference the Teams client library, you need to make sure the polyfill is included and initialized before the Teams client library is initialized.

## Full Documentation and Examples

While each interface, class, function, etc. includes compact developer documentation, full documentation about library usage, including examples, can be found [here](https://learn.microsoft.com/en-us/javascript/api/overview/msteams-client?view=msteams-client-js-latest).

## Testing

The [Teams Test App](https://aka.ms/teams-test-app) is used to validate the Teams client library APIs.

## Troubleshooting

If the CDN hash value on the npm page is out of date please refer to [here](https://github.com/OfficeDev/microsoft-teams-library-js/blob/main/packages/teams-js/README.md) for an up to date version. If you notice this problem, please report that issue to us in [GitHub Issues](https://github.com/OfficeDev/microsoft-teams-library-js/issues)

## Contributing

Please be sure to check out the [Contributor's guide](../../CONTRIBUTING.md) for crucial steps.

---
_Source: https://npm.io/package/@microsoft/teams-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
