Generated banner for Teams App Developer
Generated logo for Teams App Developer

Teams App Developer

MicrosoftOfficialPublished by Microsoft

  • Skill
  • Tool integration
  • Software development
  • MIT
  • Medium risk

From the author

Builds, tests, and deploys Microsoft 365 apps and agents for Teams and Copilot. Includes sub-skills for project creation, local testing, cloud deployment, troubleshooting, and Slack-to-Teams migration. USE FOR: Teams agent, bot, tab, message extension, Declarative Agents, Custom Engine Agents, local testing, Agents Playground, Azure resource provision, remote deployment, Slack to Teams migration, cross-platform bot development, Block Kit to Adaptive Cards conversion. DO NOT USE FOR: general web development, non-bot/non-Teams projects.
— the description by Microsoft

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The teams-app-developer skill provides a structured framework for managing the lifecycle of Microsoft 365 agents and Teams applications. It leverages the ATK CLI to handle project scaffolding, local testing via the Agents Playground, cloud provisioning on Azure, and troubleshooting. The skill includes specialized guidance for migrating Slack bots to Teams, including converting Block Kit UI to Adaptive Cards, and provides access to an extensive library of micro-expert documentation for cross-platform development.

What it does

  • Scaffolds new Microsoft 365 agents and Teams applications from templates.
  • Facilitates local testing using the Agents Playground or Teams-specific environments.
  • Automates Azure resource provisioning and cloud deployment workflows.
  • Provides diagnostic procedures for common authentication and configuration errors.
  • Supports migration of Slack bots to the Teams platform.
  • Manages project configuration and environment variables for ATK-based projects.

When to use it

  • When starting a new Teams app, bot, or Declarative Agent project.
  • When you need to test an agent locally before deploying to the cloud.
  • When migrating existing Slack bots to the Microsoft Teams ecosystem.
  • When troubleshooting deployment or authentication issues in a Teams project.
  • When you need to provision Azure infrastructure for a Teams application.

Advantages

  • Streamlines the development lifecycle with standardized CLI commands.
  • Reduces development time by offering a local testing playground.
  • Provides expert-level guidance for complex cross-platform migrations.
  • Ensures consistent configuration management across development environments.
  • Includes robust error-handling protocols for common platform-specific pitfalls.

Usage examples

“Create a new Teams bot project using the default template.”
The agent will initialize a new project folder, configure the necessary YAML files, and guide you through the initial setup using the ATK CLI.
“How do I migrate my Slack bot to Microsoft Teams?”
The agent will initiate the slack-to-teams workflow, providing access to cross-platform bridging experts and guidance on converting UI components.
“My Teams bot is returning a 401 error, how do I fix it?”
The agent will trigger the troubleshooting workflow, checking your environment variables, tunnel status, and authentication configuration.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/microsoft/teams-app-developer/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip teams-app-developer.zip -d .agents/skills

Documentation by Microsoft

Microsoft 365 Agents Toolkit Skill

Build Microsoft 365 agents and Teams apps using the ATK CLI.

AI Behavior Guidelines

  1. Testing Strategy: Recommend Agents Playground first (faster, no M365 needed). Use Teams workflow only if user explicitly requests it.

  2. Environment Variables: NEVER hardcode secrets or make up placeholder values. Always ask users for real values.

  3. Error Handling: Read error messages carefully. Check env/.env.local, .localConfigs, and atk auth list. Common pitfalls:

    • AADSTS7000229 → aadApp/create missing generateServicePrincipal: true in YAML — add it and re-provision

    • Missing TENANT_ID in .localConfigs → SDK uses wrong token authority → 401 from Bot Connector

    • 401 persists after auth fix → devtunnel URL may be blacklisted — create a fresh tunnel

    • See troubleshoot/troubleshoot.md for full diagnostic steps

  4. Long-Running Commands — WAIT for completion:

    • atk new, atk provision, atk deploy can take several minutes

    • Always wait for completion before running the next step (timeout 120000ms+)

  5. Local Service Startup — Hangs terminal (expected):

    • npm run dev, npm start, python app.py, devtunnel host, etc. will hang — the process keeps running indefinitely

    • ALWAYS run as a background process (isBackground=true) — NEVER use isBackground=false for these commands

    • Do NOT wait for it to "finish" — verify startup by checking output for "listening on port" or tunnel URL

    • If errors appear, read logs, diagnose, fix, restart

    • Use a NEW terminal to launch Agents Playground or open Teams sideloading URL

  6. Monitor App Logs: Periodically check background terminal output for runtime errors. If the app crashes, read the error, fix the root cause, and restart.

  7. Telemetry Tagging: Before running any atk CLI commands, set the session environment variable so all CLI invocations are tagged as skill-initiated:

    export ATK_CLI_SKILL=true

    Run this once at the start of the session. All subsequent atk commands in the same terminal will inherit it.

ATK CLI Setup

atk --version  # Must be > 1.1.5-beta

If ATK is not found or version is too old:

npm i -g @microsoft/m365agentstoolkit-cli@beta

CLI Global Options

OptionMeaningRecommendation
-iInteractive modeAlways use -i false in automation to avoid hanging
-fProject folderDefault to be current directory, used when specifying a custom folder. When scaffolding a new project, this is the parent folder where the project folder will be created under.
-hCommand helpUse atk <command> -h for quick syntax checks

Sub-Skills

Sub-SkillWhen to UseReference
create-projectScaffold new project from template, choose template, atk newcreate-project/create-project.md
test-playgroundTest locally with Agents Playground, agentsplayground, quick testingtest-playground/test-playground.md
test-teamsRun on Teams, devtunnel, sideload, Teams testing, test in Copilottest-teams/test-teams.md
provision-deployProvision Azure resources, deploy to cloud, atk provision, atk deployprovision-deploy/provision-deploy.md
troubleshootFix errors, 401, port conflicts, YAML errors, stale botstroubleshoot/troubleshoot.md
slack-to-teamsMigrate Slack bot to Teams, cross-platform bridging, Block Kit to Adaptive Cardsslack-to-teams/SKILL.md

MANDATORY: Before executing any workflow, read the corresponding sub-skill document.

Shared References

  • manifest-and-yaml.md — Project files, YAML config, env vars, .localConfigs flow

  • commands.md — ATK CLI commands: package, validate, share, collaborate

  • templates.md — Complete template catalog with language support

  • experts/ — 100+ micro-expert files: Teams SDK, Slack SDK, cross-platform bridging, deploy, AI models, security, language conversion

  • docs/ — Platform comparison guides: UI, messaging, identity, infrastructure, feature gaps

Workflow Chains

Match user intent to the smallest valid workflow.

User IntentWorkflow (read in order)
Build new app from scratchcreate-project → test-playground
Test existing project locallytest-playground (recommended) or test-teams
Deploy to Azureprovision-deploy
Fix broken bottroubleshoot → re-test
Migrate Slack bot to Teamsslack-to-teams

MANDATORY: Before executing any slack-to-teams workflow, read slack-to-teams/SKILL.md first. The sub-skill contains a routed expert system with 100+ micro-expert files for cross-platform bot development.

ATK Project Context Resolution

Resolve config values only when missing. If a value is already known in the session, reuse it.

Step 1: Detect ATK Project

If m365agentstoolkit*.yml exists in the current folder, treat it as an ATK project and parse configuration.

Step 2: Resolve Common Configuration

Resolve variables referenced in m365agentstoolkit*.yml. Common variables: AZURE_OPENAI_API_KEY AZURE_OPENAI_ENDPOINT AZURE_OPENAI_DEPLOYMENT_NAME

Step 3: Collect Missing Values

If required values are missing, ask the user for only the missing ones.

Refer to manifest-and-yaml.md for full config-file details.

Files

experts/bridge/channel-ops-graph-ts.md

channel-ops-graph-ts

purpose

Bridges Slack channel operations (conversations.*) and Teams channel management via Microsoft Graph for cross-platform bots targeting Slack, Teams, or both.

rules

  1. Slack conversations.create → Graph POST /teams/{team-id}/channels. Slack creates channels in a flat workspace namespace. Teams channels always belong to a specific team — you must know the team-id first. The request body includes displayName, description, and membershipType (standard, private, shared). learn.microsoft.com -- Create channel

  2. Slack conversations.archive → no true archive in Teams. Teams has no channel archive API. Workarounds: (a) delete the channel (destructive, 30-day soft delete), (b) rename the channel with a [ARCHIVED] prefix, (c) remove all members except owners, (d) for the entire team, use POST /teams/{team-id}/archive. Individual channel archival is not supported. learn.microsoft.com -- Archive team

  3. Slack conversations.invite → Graph POST /teams/{team-id}/channels/{channel-id}/members. The request body must include the user's Azure AD Object ID (@odata.type: '#microsoft.graph.aadUserConversationMember') and a roles array (['owner'] or [] for member). Private channel membership is managed separately from standard channels. learn.microsoft.com -- Add channel member

  4. Slack conversations.kick → Graph DELETE /teams/{team-id}/channels/{channel-id}/members/{membership-id}. You must first resolve the membership-id by listing channel members (GET /teams/{team-id}/channels/{channel-id}/members) and finding the member by their Azure AD Object ID. You cannot delete by user ID directly. learn.microsoft.com -- Remove member

  5. Slack conversations.setTopic → Graph PATCH /teams/{team-id}/channels/{channel-id} with description. Slack channels have a separate topic field. Teams channels use the description field as the closest equivalent. The channel name is updated via the displayName field. learn.microsoft.com -- Update channel

  6. All channel operations require a team-id. Slack has a flat channel namespace (every channel has a globally-unique C-ID). Teams channels are nested under teams. Most operations need both team-id and channel-id. Resolve team IDs via GET /me/joinedTeams or GET /groups with Teams filter. learn.microsoft.com -- List joined teams

  7. Channel name restrictions differ from Slack. Teams channel names cannot contain: ~ # % & * { } / \ : < > ? + | ' ". Maximum length is 50 characters (Slack allows 80). Channel names must be unique within a team. Validate and sanitize names during migration. learn.microsoft.com -- Channel limits

  8. Graph API requires application or delegated permissions. Channel operations need Channel.Create, ChannelMember.ReadWrite.All, Channel.Delete.All (application permissions) or equivalent delegated permissions. These require Azure AD admin consent. Slack's bot token scopes (channels:manage, channels:write.invites) have no direct Azure AD equivalent. learn.microsoft.com -- Graph permissions

  9. Slack conversations.list → Graph GET /teams/{team-id}/channels. List all channels in a team. For listing channels across teams, iterate over GET /me/joinedTeams first, then list channels per team. There is no single API to list all channels across all teams (unlike Slack's flat listing). learn.microsoft.com -- List channels

  10. Private channels have separate membership management. Slack private channels (is_private: true) map to Teams private channels (membershipType: 'private'). Private channel members are managed via the channel members API, not the team membership. Adding a user to the team does NOT add them to private channels — you must add them to both. learn.microsoft.com -- Private channels

  11. Reverse direction (Teams → Slack): For Teams → Slack, map Graph API channel operations to Slack's conversations.* API methods. POST /teams/{team-id}/channels maps to conversations.create. POST /channels/{id}/members maps to conversations.invite. DELETE /channels/{id}/members/{id} maps to conversations.kick. PATCH /channels/{id} with description maps to conversations.setTopic. Note that Slack has a flat channel namespace (no team-id required) and supports true channel archiving via conversations.archive.

patterns

Create channel + invite members

Slack (before):

import { App } from "@slack/bolt";

const app = new App({
  token: process.env.SLACK_BOT_TOKEN!,
  signingSecret: process.env.SLACK_SIGNING_SECRET!,
});

app.command("/create-channel", async ({ ack, command, client }) => {
  await ack();
  const [name, ...memberIds] = command.text.split(" ");

  // Create channel in flat namespace
  const channel = await client.conversations.create({
    name: name.toLowerCase().replace(/\s+/g, "-"),
    is_private: false,
  });

  // Invite members by Slack user ID
  if (memberIds.length > 0) {
    await client.conversations.invite({
      channel: channel.channel!.id!,
      users: memberIds.join(","), // comma-separated U-IDs
    });
  }

  await client.chat.postMessage({
    channel: command.channel_id,
    text: `Channel <#${channel.channel!.id}> created!`,
  });
});

Teams (after):

import { App } from "@microsoft/teams.apps";
import { ConsoleLogger } from "@microsoft/teams.common";
import { Client } from "@microsoft/microsoft-graph-client";

const app = new App({
  logger: new ConsoleLogger("my-bot", { level: "info" }),
});

// Initialize Graph client (use app-only auth in production)
function getGraphClient(token: string): Client {
  return Client.init({
    authProvider: (done) => done(null, token),
  });
}

app.message(/^\/?create-channel (.+)$/i, async ({ send, activity }) => {
  const args = activity.text?.replace(/^\/?create-channel\s+/i, "").split(" ") ?? [];
  const [rawName, ...memberAadIds] = args;

  // Sanitize channel name for Teams restrictions
  const channelName = rawName
    .replace(/[~#%&*{}\/\\:<>?+|'"]/g, "")
    .substring(0, 50);

  // Teams channels require a team-id (no flat namespace)
  const teamId = activity.channelData?.team?.id;
  if (!teamId) {
    await send("This command must be run in a team context.");
    return;
  }

  const graphToken = await getAppOnlyToken();
  const graph = getGraphClient(graphToken);

  // Create channel under the team
  const channel = await graph.api(`/teams/${teamId}/channels`).post({
    displayName: channelName,
    description: `Created by bot on ${new Date().toISOString()}`,
    membershipType: "standard",
  });

  // Invite members by Azure AD Object ID (not Slack U-ID)
  for (const aadId of memberAadIds) {
    await graph.api(`/teams/${teamId}/channels/${channel.id}/members`).post({
      "@odata.type": "#microsoft.graph.aadUserConversationMember",
      "[email protected]": `https://graph.microsoft.com/v1.0/users('${aadId}')`,
      roles: [], // empty = member, ['owner'] = owner
    });
  }

  await send(`Channel **${channelName}** created with ${memberAadIds.length} members.`);
});

async function getAppOnlyToken(): Promise<string> {
  // Use @azure/identity ConfidentialClientApplication for production
  return "...";
}

app.start(3978);
Set topic + archive channel

Slack (before):

import { App } from "@slack/bolt";

const app = new App({
  token: process.env.SLACK_BOT_TOKEN!,
  signingSecret: process.env.SLACK_SIGNING_SECRET!,
});

app.command("/set-topic", async ({ ack, command, client }) => {
  await ack();
  await client.conversations.setTopic({
    channel: command.channel_id,
    topic: command.text,
  });
  await client.chat.postMessage({
    channel: command.channel_id,
    text: `Topic updated to: ${command.text}`,
  });
});

app.command("/archive-channel", async ({ ack, command, client }) => {
  await ack();
  await client.conversations.archive({
    channel: command.channel_id,
  });
  // Channel is now archived — no more messages can be posted
});

Teams (after):

import { App } from "@microsoft/teams.apps";
import { ConsoleLogger } from "@microsoft/teams.common";
import { Client } from "@microsoft/microsoft-graph-client";

const app = new App({
  logger: new ConsoleLogger("my-bot", { level: "info" }),
});

function getGraphClient(token: string): Client {
  return Client.init({ authProvider: (done) => done(null, token) });
}

// Set channel description (closest to Slack topic)
app.message(/^\/?set-topic (.+)$/i, async ({ send, activity }) => {
  const topic = activity.text?.replace(/^\/?set-topic\s+/i, "") ?? "";
  const teamId = activity.channelData?.team?.id;
  const channelId = activity.channelData?.channel?.id;

  if (!teamId || !channelId) {
    await send("This command must be run in a team channel.");
    return;
  }

  const graph = getGraphClient(await getAppOnlyToken());
  await graph.api(`/teams/${teamId}/channels/${channelId}`).patch({
    description: topic,
  });

  await send(`Channel description updated to: ${topic}`);
});

// Archive channel — no direct equivalent, rename with prefix
app.message(/^\/?archive-channel$/i, async ({ send, activity }) => {
  const teamId = activity.channelData?.team?.id;
  const channelId = activity.channelData?.channel?.id;

  if (!teamId || !channelId) {
    await send("This command must be run in a team channel.");
    return;
  }

  const graph = getGraphClient(await getAppOnlyToken());

  // Get current channel name
  const channel = await graph.api(`/teams/${teamId}/channels/${channelId}`).get();

  // Rename with archive prefix (best available workaround)
  await graph.api(`/teams/${teamId}/channels/${channelId}`).patch({
    displayName: `[ARCHIVED] ${channel.displayName}`.substring(0, 50),
    description: `Archived on ${new Date().toISOString()}. ${channel.description ?? ""}`,
  });

  await send("Channel marked as archived. Note: Teams does not support true channel archival.");
});

async function getAppOnlyToken(): Promise<string> {
  return "...";
}

app.start(3978);
Channel operation mapping table
Slack APIGraph API EquivalentNotes
conversations.create({ name })POST /teams/{team-id}/channelsMust specify team-id
conversations.archive({ channel })(no equivalent)Rename with prefix, or delete
conversations.unarchive({ channel })(no equivalent)Rename back
conversations.invite({ channel, users })POST /teams/{team-id}/channels/{id}/membersOne member per call; needs AAD Object ID
conversations.kick({ channel, user })DELETE /channels/{id}/members/{membership-id}Must resolve membership-id first
conversations.setTopic({ channel, topic })PATCH /channels/{id} with descriptionTopic → description
conversations.rename({ channel, name })PATCH /channels/{id} with displayName50 char limit
conversations.list()GET /teams/{team-id}/channelsPer-team, not workspace-wide
conversations.info({ channel })GET /teams/{team-id}/channels/{id}Needs team-id
conversations.members({ channel })GET /teams/{team-id}/channels/{id}/membersReturns AAD user objects

pitfalls

  • No flat channel namespace: Slack's C-ID identifies a channel globally. Teams requires both team-id and channel-id for most operations. Bots must resolve or store the team context from activity.channelData.team.id.

  • Channel name validation: Teams rejects names with special characters that Slack allows. Always sanitize channel names before creating. The # character — commonly used in Slack — is not allowed in Teams channel names.

  • Membership ID resolution for kicks: You cannot remove a member by Azure AD Object ID alone. First list members, find the matching conversationMember.id, then delete by that membership ID. This is a two-API-call operation.

  • No true channel archive: Slack's archive makes a channel read-only while preserving it. Teams has no equivalent. The rename-with-prefix workaround doesn't prevent new messages. True read-only requires deleting the channel (which has a 30-day recovery window).

  • Private channel membership is separate: Adding a user to a team does NOT automatically add them to private channels. You must explicitly add them to each private channel. This differs from Slack where inviting to a private channel only requires the channel invite API.

  • Graph API rate limits: Graph API has its own throttling (separate from Bot Framework). Bulk channel operations (creating many channels, inviting many users) should include retry logic with exponential backoff on HTTP 429 responses.

  • Admin consent required: Application-level Graph permissions (Channel.Create, ChannelMember.ReadWrite.All) require Azure AD admin consent. This is a deployment-time concern — the bot code may work in dev but fail in production if admin consent hasn't been granted.

references

instructions

Use this expert when adding cross-platform support in either direction for channel management operations. It covers: Slack conversations.* bridged to Graph API channel endpoints, conversations.archive workarounds in Teams, conversations.invite bridged to Graph member addition, conversations.kick with membership ID resolution, conversations.setTopic bridged to channel description update, team-id requirement, channel name restrictions, Graph API permission requirements, and reverse mapping from Graph channel operations back to Slack conversations.* methods. Pair with ../teams/graph.usergraph-appgraph-ts.md for Graph API authentication, identity-oauth-bridge-ts.md for user ID mapping (Slack U-ID to AAD Object ID), and rate-limiting-resilience-ts.md for Graph API throttling patterns.

research

Deep Research prompt:

"Write a micro expert for bridging Slack channel management operations (conversations.create, conversations.archive, conversations.invite, conversations.kick, conversations.setTopic, conversations.list) and Microsoft Teams channel management via the Graph API in either direction. Cover: team-id requirement, channel name restrictions, private channel membership, the lack of channel archive API in Teams, membership ID resolution for removal, Graph API permissions, rate limiting, and reverse mapping from Graph operations back to Slack conversations.* methods. Include TypeScript code examples and a mapping table."

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an API key, Needs Python, Needs Node.js

Security

What our scanner noticed· Medium risk

  • Possible data-exfiltration endpoints
  • Instructions that use the network
  • Downloads piped into a shell

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Microsoft
Publisher
Microsoft (Official)
Source
microsoft/skills · .github/plugins/microsoft-365-agents-toolkit/skills/teams-app-developer · commit 0696600
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Microsoft.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download teams-app-developer.zip