# @microsoft/app-manifest

> `@microsoft/app-manifest`

Latest version **1.1.2** (published 2026-09-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @microsoft/app-manifest
pnpm add @microsoft/app-manifest
yarn add @microsoft/app-manifest
bun add @microsoft/app-manifest
```

## Health

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

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

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2026-09-03 |
| First published | 2025-04-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 6.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 768 |
| Maintainers | microsoft1es, microsoft-oss-releases, zhyuer, nintan, msteamsfx |

## Links

- npm: https://www.npmjs.com/package/@microsoft/app-manifest
- Repository: https://github.com/OfficeDev/microsoft-365-agents-toolkit
- Homepage: https://github.com/OfficeDev/microsoft-365-agents-toolkit#readme
- Issues: https://github.com/OfficeDev/microsoft-365-agents-toolkit/issues
- npm.io page: https://npm.io/package/@microsoft/app-manifest

## Dependencies (7)

- [ajv](https://npm.io/package/ajv.md) ^8.18.0
- [strip-bom](https://npm.io/package/strip-bom.md) ^5.0.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^3.3.2
- [ajv-formats](https://npm.io/package/ajv-formats.md) ^3.0.1
- [ajv-draft-04](https://npm.io/package/ajv-draft-04.md) ^1.0.0
- [@types/fs-extra](https://npm.io/package/@types/fs-extra.md) ^11.0.1
- [@types/strip-bom](https://npm.io/package/@types/strip-bom.md) ^4.0.1

## Recent versions

- 1.1.2 (latest) — 2026-09-03
- 1.1.3-alpha.8ef7b943de.0 (alpha) — 2026-09-15
- 1.1.3-beta.2026091502.0 (beta) — 2026-09-15
- 1.1.2-rc.0 (rc) — 2026-08-31
- 1.1.3-alpha.3921de3a75.0 — 2026-09-14
- 1.1.3-alpha.1df35c7d32.0 — 2026-09-11
- 1.1.3-alpha.8c1ec9547b.0 — 2026-09-10
- 1.1.3-alpha.dc668aaabb.0 — 2026-09-10
- 1.1.3-alpha.988ae99400.0 — 2026-09-09
- 1.1.3-alpha.f3fb2cd65d.0 — 2026-09-08
- 1.1.3-beta.2026090805.0 — 2026-09-08
- 1.1.3-alpha.26ce7a8dda.0 — 2026-09-08
- 1.1.3-beta.2026090710.0 — 2026-09-07
- 1.1.3-alpha.564122f4e1.0 — 2026-09-07
- 1.1.3-alpha.d2722cc66f.33964085572.0 — 2026-09-05
- … 484 more at https://npm.io/package/@microsoft/app-manifest/versions

## README

## 📦 Package Name

`@microsoft/app-manifest`

---

## ✨ Features

A collection of TypeScript definitions and converters for Microsoft 365 App manifests.

- **Strongly‑typed interfaces** for three manifest types with all versions generated from Microsoft’s official [JSON schemas](https://developer.microsoft.com/json-schemas/), guaranteeing compile‑time type correctness:  
  - Teams Manifest: 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.19, 1.20, 1.21, 1.22, devPreview  
  - Declarative Agent Manifest: v1.0, v1.2, v1.3, v1.4  
  - API Plugin Manifest: v2.1, v2.2

- **Bi‑directional conversions** from JSON to manifest or from manifest to JSON(`jsonToManifest` and `manifestToJson`) with runtime type validation.

- **Schema validation utilities** to validating manifests against schemas  

- **File I/O helpers** to conveniently load manifest from file or dump manifest to file in JSON format.

- **Modular versioning**: manifests organized per version file, avoiding type collisions.

## 📥 Installation

```bash
npm install @microsoft/app-manifest 
```

## 📖 Usage

### Manipulate manifest

**Automatic version inference**

You can assign a manifest object directly to the discriminated union types (`TeamsManifest`, `DeclarativeAgentManifest` or `APIPluginManifest`) without specifying a concrete version type. TypeScript will infer the specific version based on the `manifestVersion` field:

![not_specify_version](https://github.com/user-attachments/assets/2f10873b-974a-4998-a80c-6bdd6609bdfc)

**Manually specified version**

You can specify a concrete version type:

![specify_version](https://github.com/user-attachments/assets/d6a566af-8b68-41cf-b1a2-a1083e16e6c7)

### Manifest to/from JSON converters

Convert JSON string to Teams manifest type and check the version at run time:

```typescript
const json = "{ \"manifestVersion\": \"1.20\", \"id\": \"app-id\", ...}";
const manifest = TeamsManifestConverter.jsonToManifest(json);
if (manifest.manifestVersion === "1.20") {
  // TypeScript will infer the type as TeamsManifestV1D20
  const manifestV1D20 = manifest as TeamsManifestV1D20.TeamsManifestV1D20;
  // You can now access properties specific to TeamsManifestV1D20
}
```

Convert JSON string to Teams manifest type by specifying the version at compile time:

```typescript
const json = "{ \"manifestVersion\": \"1.20\", \"id\": \"app-id\", ...}";
const manifest = TeamsManifestConverter.jsonToManifest(json) as TeamsManifestV1D20.TeamsManifestV1D20;
// You can now access properties specific to TeamsManifestV1D20
```

Convert JSON string to declarative agent manifest type and api plugin manifest type:

```typescript
const daManifest = DeclarativeAgentManifestConverter.jsonToManifest(daManifestJSON) as DeclarativeAgentManifest;
const pluginManifest = ApiPluginManifestConverter.jsonToManifest(pluginManifestJSON) as APIPluginManifest;
```

Convert manifest object to JSON string:

```typescript
const jsonString = TeamsManifestConverter.manifestToJson(manifest);
const daJsonString = DeclarativeAgentManifestConverter.manifestToJson(daManifest);
const pluginJsonString = ApiPluginManifestConverter.manifestToJson(pluginManifest);
```

Note that the converts to/from JSON will throw runtime type check failures.

### Manifest utilities

Validate manifest against schema: 

```typescript
const failures = await AppManifestUtils.validateAgainstSchema(manifest);
```

Read and write manifest:

```typescript
const teamsManifestPath = "path/to/your/teams_manifest.json"; 
// read Teams manifest with type check
const teamsManifest1 = await AppManifestUtils.readTeamsManifest(teamsManifestPath);
// read Teams manifest and validate against schema
const [teamsManifest2, failedValidations1] = await AppManifestUtils.readAndValidateTeamsManifest(teamsManifestPath);
 
const daManifestPath = "path/to/your/da_manifest.json"; 
// read declarative agent manifest with type check
const daManifest1 = await AppManifestUtils.readDeclarativeAgentManifest(daManifestPath);
// read declarative agent manifest and validate against schema
const [daManifest2, failedValidations2] = await AppManifestUtils.readAndValidateDeclarativeAgentManifest(daManifestPath);

const pluginManifestPath = "path/to/your/plugin_manifest.json"; 
// read API plugin manifest with type check
const pluginManifest1 = await AppManifestUtils.readApiPluginManifest(pluginManifestPath);
// read API plugin manifest and validate against schema
const [pluginManifest2, failedValidations3] = await AppManifestUtils.readAndValidateApiPluginManifest(pluginManifestPath);
```

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