agentleFS
soulemikesoulemike/microsoft-skills/skills/teams/SKILL.md

teams

Skill2 starsChanged 3 months agoMITView on GitHub

Use this skill for Microsoft Teams channel and membership retrieval through Microsoft Graph with automatic pagination.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill for Teams channel and membership reads that are exposed through Microsoft Graph.

    line 22
  2. Distinctive:

    Avoid client secret auth in production when managed identity or federated credentials are possible.

    line 67

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Microsoft Teams Skill

Agent Summary

Use this skill for Teams channel and membership reads that are exposed through Microsoft Graph. Authenticate with ./skills/graph/Connect-GraphApi.ps1, then use the Teams wrappers for team channels, team members, or channel members.

When to Use

  • List channels for a team.
  • Retrieve one channel by ID.
  • List team members or private/shared channel members.

Required Parameters

Get-TeamsChannel.ps1

ParameterTypeRequiredNotes
TeamIdstringYesMicrosoft Teams team identifier.
AuthContexthashtableYesGraph auth context from Connect-GraphApi.ps1.
ChannelIdstringNoRetrieve a single channel instead of listing.

Get-TeamsMember.ps1

ParameterTypeRequiredNotes
TeamIdstringYesMicrosoft Teams team identifier.
AuthContexthashtableYesGraph auth context from Connect-GraphApi.ps1.
ChannelIdstringNoWhen present, retrieves channel-specific members.

Invoke-TeamsGraphRequest.ps1

ParameterTypeRequiredNotes
UristringYesTeams-relative path or absolute Graph nextLink URL.
AuthContexthashtableYesGraph auth context.
MethodstringNoDefaults to GET.
BodyobjectNoRequest payload for writes.

Example Agent Prompts

  • "List all channels in this Microsoft Team."
  • "Get all members of a private Teams channel."
  • "Call the Teams Graph endpoint directly for a team membership query."

Example Agent Workflow

$ctx = ./skills/graph/Connect-GraphApi.ps1 -AuthenticationType ManagedIdentity -Environment AzureCloud

$channels = ./skills/teams/Get-TeamsChannel.ps1 -TeamId $teamId -AuthContext $ctx

Security Caveats

  • Teams APIs are Graph APIs, so limit Graph application permissions to the smallest set possible.
  • Some membership operations are valid only for private or shared channels; standard channels inherit team membership.
  • Avoid client secret auth in production when managed identity or federated credentials are possible.

Overview

This skill automates Microsoft Teams channel and membership retrieval using Microsoft Graph. It wraps Teams-specific Graph paths and automatically follows Graph pagination.

Authentication

  • Graph v1.0 token
  • App-only with application permissions
  • Group.ReadWrite.All often required

Endpoints

Uses Graph endpoint from environment (see Environment Endpoints doc).

Skills

FilePurpose
Get-TeamsChannel.ps1Gets channel details for a team, or lists all channels for a team.
Get-TeamsMember.ps1Gets team members, or channel members for a specific channel.
Invoke-TeamsGraphRequest.ps1Invokes Teams Graph requests (relative Teams paths) and follows @odata.nextLink pagination.

Toolchain

ServiceToolBest ForGraph VersionLimitations
TeamsMicrosoft.Graph SDK (Get-MgTeam, Get-MgTeamChannel)Team/channel lifecycle, messages, tabs, appsv1.0Large module footprint; some operations require Group.ReadWrite.All
TeamsRaw REST (Invoke-MgGraphRequest)Direct control over Teams endpointsv1.0 / betaCaller must handle pagination and throttling
TeamsPnP CLI (m365 teams)Cross-platform Teams admin scriptingv1.0Community-driven; no Microsoft SLA

Patterns & Caveats

  • Teams operations are Graph operations
  • beta only for preview features
  • Pagination via @odata.nextLink

Examples

  1. List all channels in a team (GET /teams/{team-id}/channels):
$authContext = ./skills/graph/Connect-GraphApi.ps1 -AuthenticationType ManagedIdentity -Environment AzureCloud
./skills/teams/Get-TeamsChannel.ps1 -TeamId $teamId -AuthContext $authContext
  1. Get a specific channel within a team (GET /teams/{team-id}/channels/{channel-id}):
$authContext = ./skills/graph/Connect-GraphApi.ps1 -AuthenticationType ManagedIdentity -Environment AzureCloud
./skills/teams/Get-TeamsChannel.ps1 -TeamId $teamId -ChannelId $channelId -AuthContext $authContext
  1. List channel members for a private or shared channel (GET /teams/{team-id}/channels/{channel-id}/members):
$authContext = ./skills/graph/Connect-GraphApi.ps1 -AuthenticationType ManagedIdentity -Environment AzureCloud
./skills/teams/Get-TeamsMember.ps1 -TeamId $teamId -ChannelId $channelId -AuthContext $authContext

Prerequisites

  • Required modules:
    • Microsoft Graph authentication and session management modules (installed by prerequisites/Install-RequiredModules.ps1)
  • Required permissions:
    • Microsoft Graph application permissions for Teams operations, typically Group.ReadWrite.All

Related Docs

  • Auth Patterns
  • Token Chaining
  • Environment Endpoints

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.