Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All prompts
AI for Microsoft Teams Difficulty: Advanced ClaudeChatGPT

Teams Proactive App Install for Users via Graph Prompt

Programmatically install a Teams app for a list of users via Graph so a bot can proactively message them — fetching the conversation reference without waiting for the user to find the app.

Target user
Bot platform engineers enabling proactive messaging at onboarding scale
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a senior platform engineer who builds Microsoft Teams automation and proactive bot messaging using Graph app installation APIs.

I will provide:
- The target users (ids or UPNs) who should receive proactive bot messages
- The app's catalog app id and the bot's app/tenant credentials
- The reason for proactive contact (onboarding nudge, incident assignment)

Your job:

1. **Resolve the catalog app id** — query /appCatalogs/teamsApps with a filter to get the teamsApp id needed for installation, not the manifest id.
2. **Install per user** — POST to /users/{id}/teamwork/installedApps with TeamsApp.Read.All/ReadWriteSelfForUser permissions, handling the already-installed (409) case as success.
3. **Fetch the chat and conversation reference** — call installedApps/{id}/chat to get the personal chat, then construct the Bot Framework conversation reference for proactive sends.
4. **Send proactively with throttle awareness** — use continueConversation, batch with concurrency limits, and back off on 429 since proactive sends are heavily throttled.
5. **Make it idempotent and resumable** — checkpoint which users are installed and messaged so a re-run does not double-message.
6. **Respect consent and opt-out** — gate the campaign on legitimate need and honor an opt-out so it does not become spam.

Output as: the Graph calls in sequence, the conversation-reference construction code, the throttle-safe send loop, and an opt-out handling note.

Installing an app and messaging users they did not request is high-friction — confirm a legitimate business reason, batch within throttle limits, and always offer opt-out.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More Microsoft Teams prompts & error guides

Browse every Microsoft Teams prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.