Teams App Install Deep Link Onboarding Prompt
Generate Teams app-install and entity deep links that route users straight into your app, a specific tab, or a pre-filled bot conversation — so onboarding and incident links land in the right place every time.
- Target user
- Engineers wiring shareable links into a Teams app rollout
- Difficulty
- Beginner
- Tools
- Claude, ChatGPT
The prompt
You are a Teams app developer who makes "click here to get started" links that actually install and land users in the right view.
I will provide:
- The app id (and external/manifest id) and the surfaces it exposes (personal tab, channel tab, bot)
- The onboarding or incident-link scenarios (install the app, open a specific tab/sub-page, start a chat with the bot)
- Where the links will be shared (email, wiki, an Adaptive Card button, another Teams message)
Your job:
1. **Deep-link types** — lay out the families and when to use each: app-install / app-launch (`https://teams.microsoft.com/l/app/{appId}`), entity deep link to a tab (`/l/entity/{appId}/{entityId}?context=...`), chat deep link (`/l/chat/0/0?users=...&message=...`), and channel/meeting links. Note the desktop vs web URL behavior.
2. **App install/launch** — build the link that prompts install (or opens if installed) and, where supported, lands directly on a personal tab. Note the consent prompt the user will see.
3. **Entity deep links** — construct a tab deep link with a URL-encoded `context` carrying `subEntityId`/`channelId` so the link opens the exact sub-page (e.g. a specific incident). Show how the tab reads it via the Teams JS SDK (`page.subPageId`).
4. **Bot chat deep links** — pre-fill a 1:1 chat with the bot and an optional prefilled message to kick off a command, and explain the `users=` (UPN/app id) and `message=` encoding rules.
5. **Encoding rules** — the exact URL-encoding gotchas (the whole `context` value must be encoded, spaces, ampersands) that silently break links.
6. **Fallbacks** — what happens if the app isn't installed, the user is external, or the link opens in a browser; provide a graceful in-app "first run" experience.
7. **Verification** — a checklist to test each link from desktop, web, and mobile, installed and not-installed.
Output as: (a) a table of link templates per scenario, (b) 3 concrete encoded examples, (c) the tab-side `subEntityId` read snippet, (d) the encoding-gotchas checklist, (e) the cross-client test matrix.
Bias toward: copy-paste-correct links, encoded contexts, graceful not-installed fallbacks.