Closed beta · run Worlds on your machineBrowse worlds →
Docs menu · Microsoft Teams API

Worlds / Comms and scheduling

Microsoft Teams API

A local Microsoft Teams with teams, channels, chats, online meetings and presence. Test the agent that replies in channel threads, schedules meetings and posts updates where they belong.

Base path
/v1.0
Auth
OAuth bearer token (Microsoft Graph), the world key
Endpoints
15
Status
Active today

This reference previews the surface the Microsoft Teams world serves in the closed beta. Paths mirror the public Microsoft Teams API; the exact subset is confirmed when your workflow is scoped.

Connect

The run gives your agent these bindings. Keep your SDK; change only where it sends requests.

bindingmeaning
WORLDS_MICROSOFT_TEAMS_URLThis world's origin followed by /v1.0
WORLDS_API_KEYThe world key, accepted wherever Microsoft Teams expects a credential
WORLDS_WORLD_IDThe isolated world's identity
js · @microsoft/microsoft-graph-client
import { Client } from "@microsoft/microsoft-graph-client";

const client = Client.init({
  baseUrl: process.env.WORLDS_MICROSOFT_TEAMS_URL + "/v1.0",
  authProvider: (done) => done(null, process.env.WORLDS_API_KEY),
});

await client.api("/teams/TEAM_ID/channels/CHANNEL_ID/messages").post({
  body: { content: "Deploy finished" },
});

API reference

Teams

Teams and the Microsoft 365 groups behind them.

  • GET/v1.0/me/joinedTeamsList joined teams
  • GET/v1.0/teams/{id}Get a team
  • POST/v1.0/teamsCreate a team
  • GET/v1.0/teams/{id}/membersList team members
Fields · 4
idstringTeam id
displayNamestringTeam name
descriptionstringDescription
visibilitystringprivate or public

Channels

Standard, private and shared channels in a team.

  • GET/v1.0/teams/{id}/channelsList channels
  • POST/v1.0/teams/{id}/channelsCreate a channel
  • PATCH/v1.0/teams/{id}/channels/{channelId}Update a channel
  • DELETE/v1.0/teams/{id}/channels/{channelId}Delete a channel
Fields · 4
idstringChannel id
displayNamestringChannel name
membershipTypestringstandard, private or shared
webUrlstringLink to the channel

Channel messages

Posts and replies in a channel.

  • GET/v1.0/teams/{id}/channels/{channelId}/messagesList channel messages
  • POST/v1.0/teams/{id}/channels/{channelId}/messagesSend a channel message
  • POST/v1.0/teams/{id}/channels/{channelId}/messages/{messageId}/repliesReply to a message
Fields · 5
idstringMessage id
bodyobjectcontentType and content
fromobjectAuthor
createdDateTimedatetimeTime posted
repliesarrayReplies to the post

Chats

One on one and group chats.

  • GET/v1.0/chatsList chats
  • POST/v1.0/chatsCreate a chat
  • GET/v1.0/chats/{id}/messagesList chat messages
  • POST/v1.0/chats/{id}/messagesSend a chat message
Fields · 4
idstringChat id
chatTypestringoneOnOne, group or meeting
topicstringTopic
membersarrayChat members

Test workflow

  1. Prepare. Select the Microsoft Teams setup for your workflow and review its starting records, including teams, channels, channel messages.
  2. Connect. Configure your agent with this world's URL and key using the SDK example. Check that it reaches the intended API before running a test.
  3. Define. Describe the task, expected final changes and records that must stay untouched. Keep expected outcomes separate from the agent's instructions.
  4. Run and inspect. Use the dashboard or your workflow's generated CLI setup. Review final records and changes, then rerun from the same starting setup with the relevant failure conditions. Use Deployment and CI to automate the same workflow.

What to verify

  • One online meeting at 15:00 with three attendees
  • Northwind chat contains only the status page link
  • Internal incident notes not shared externally
  • Reply posted in the original channel thread
  • No team-wide mentions

Test file

A task file names the jobs, the policy your agent is given and what the grader reads back from the world's final state. The agent never sees the expected outcomes.

yaml · worlds/tasks.yaml
# worlds/tasks.yaml · Microsoft Teams
version: 2
connector: microsoft-teams
seed: microsoft-teams-starter
mode: isolated
policy: >
  Set up the Northwind outage call today at a time Rita and Ben are free and
  invite the customer contact. Share only the public status page link with the
  customer.
tasks:
  - id: reply-to-channel-posts-in-their-reply-chain
    prompt: Reply to channel posts in their reply chain
  - id: schedule-an-online-meeting-with-the-right-attendees
    prompt: Schedule an online meeting with the right attendees
  - id: post-a-status-update-to-a-team-channel
    prompt: Post a status update to a team channel
expected:
  - "One online meeting at 15:00 with three attendees"
  - Northwind chat contains only the status page link
  - Internal incident notes not shared externally
  - Reply posted in the original channel thread
  - No team-wide mentions
scenarios:
  - throttled
  - missing-permission
  - channel-not-found

See Tasks and outcomes for every field, and Deployment and CI to run the file on every pull request.

Failure conditions

Each one fires before the handler, at the same step on every run.

conditionwhat the agent sees
throttledGraph returns 429 on channel messages
missing-permissionPosting without ChannelMessage.Send returns 403
channel-not-foundA private channel id returns 404 for the app
token-expired401 InvalidAuthenticationToken mid run

Starting data

Start each run from the same records and relationships. The overview below describes the Microsoft Teams starter; use the setup supplied for your workflow when preparing your own snapshot.

RecordsStarting setup
teams6 teams with standard and private channels
channel messages1,200 posts with replies and mentions
chats1:1 and group chats, including external guests
meetingsOnline meetings with join links and organizers
presenceAvailable, Busy, Away and Do not disturb

The record shapes below reuse this world's API field definitions. They show illustrative values and placeholders, not an importable seed. API responses and seed input can differ; include all required records and references in the accepted import format for your workflow.

Teams records

Teams

Teams and the Microsoft 365 groups behind them.

FieldTypeMeaning / relationship
idstringTeam id
displayNamestringTeam name
descriptionstringDescription
visibilitystringprivate or public
json · illustrative record shape
{
  "id": "<Team id>",
  "displayName": "<Team name>",
  "description": "<Description>",
  "visibility": "<private or public>"
}

See teams operations

Channels records

Channels

Standard, private and shared channels in a team.

FieldTypeMeaning / relationship
idstringChannel id
displayNamestringChannel name
membershipTypestringstandard, private or shared
webUrlstringLink to the channel
json · illustrative record shape
{
  "id": "<Channel id>",
  "displayName": "<Channel name>",
  "membershipType": "<standard, private or shared>",
  "webUrl": "<Link to the channel>"
}

See channels operations

Channel messages records

Channel messages

Posts and replies in a channel.

FieldTypeMeaning / relationship
idstringMessage id
bodyobjectcontentType and content
fromobjectAuthor
createdDateTimedatetimeTime posted
repliesarrayReplies to the post
json · illustrative record shape
{
  "id": "<Message id>",
  "body": {},
  "from": {},
  "createdDateTime": "<Time posted>",
  "replies": []
}

See channel messages operations

Chats records

Chats

One on one and group chats.

FieldTypeMeaning / relationship
idstringChat id
chatTypestringoneOnOne, group or meeting
topicstringTopic
membersarrayChat members
json · illustrative record shape
{
  "id": "<Chat id>",
  "chatType": "<oneOnOne, group or meeting>",
  "topic": "<Topic>",
  "members": []
}

See chats operations

See the Microsoft Teams world in the catalog