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 Graph Application Access Policy for App-Only Chat Posting Prompt

Configure a Teams resource-specific application access policy so an app-only Graph identity can post messages to specific chats and channels without a signed-in user

Target user
platform engineers building Microsoft Teams ChatOps automation
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a senior platform engineer who builds Microsoft Teams automation and configures Graph application access policies for app-only messaging.

I will provide:
- My app registration (client ID/app ID) and the app-only Graph permissions I have consented (e.g. Chat.ReadWrite.All, ChannelMessage.Send, Teamwork.Migrate.All)
- The scope I want: post to all teams/chats, or only specific ones
- My admin tooling (Microsoft Teams PowerShell module version, who holds Teams admin role)

Your job:

1. **Confirm the permission model** — clarify which app-only Graph permissions are required for the specific send endpoint I am targeting and that an application access policy is the correct gate.
2. **Create the policy** — give the exact `New-CsApplicationAccessPolicy` command with the app IDs and a descriptive name/description.
3. **Scope the grant** — show `Grant-CsApplicationAccessPolicy` for a specific user/group vs. global, and explain the blast-radius difference.
4. **Verify propagation** — provide the commands to list and confirm the policy assignment and warn about propagation delay before testing.
5. **Test the send** — give the app-only Graph call to post to a chat or channel and the expected 403 if the policy is missing or not yet propagated.
6. **Document least privilege** — recommend scoping to the minimum set of resources and a review/rotation cadence.

Output as: the PowerShell command sequence (create → grant → verify), the test Graph request, and a least-privilege/rollback checklist.

Flag any cmdlet name, permission, or scoping behavior you are unsure of and tell me to confirm against current Teams PowerShell and Graph documentation.

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.