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.
| binding | meaning |
|---|---|
WORLDS_MICROSOFT_TEAMS_URL | This world's origin followed by /v1.0 |
WORLDS_API_KEY | The world key, accepted wherever Microsoft Teams expects a credential |
WORLDS_WORLD_ID | The isolated world's identity |
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
id | string | Team id |
displayName | string | Team name |
description | string | Description |
visibility | string | private 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
id | string | Channel id |
displayName | string | Channel name |
membershipType | string | standard, private or shared |
webUrl | string | Link 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
id | string | Message id |
body | object | contentType and content |
from | object | Author |
createdDateTime | datetime | Time posted |
replies | array | Replies 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
id | string | Chat id |
chatType | string | oneOnOne, group or meeting |
topic | string | Topic |
members | array | Chat members |
Test workflow
- Prepare. Select the Microsoft Teams setup for your workflow and review its starting records, including teams, channels, channel messages.
- 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.
- Define. Describe the task, expected final changes and records that must stay untouched. Keep expected outcomes separate from the agent's instructions.
- 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.
# 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-foundSee 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.
| condition | what the agent sees |
|---|---|
throttled | Graph returns 429 on channel messages |
missing-permission | Posting without ChannelMessage.Send returns 403 |
channel-not-found | A private channel id returns 404 for the app |
token-expired | 401 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.
| Records | Starting setup |
|---|---|
| teams | 6 teams with standard and private channels |
| channel messages | 1,200 posts with replies and mentions |
| chats | 1:1 and group chats, including external guests |
| meetings | Online meetings with join links and organizers |
| presence | Available, 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.
| Field | Type | Meaning / relationship |
|---|---|---|
id | string | Team id |
displayName | string | Team name |
description | string | Description |
visibility | string | private or public |
{
"id": "<Team id>",
"displayName": "<Team name>",
"description": "<Description>",
"visibility": "<private or public>"
}Channels records
Channels
Standard, private and shared channels in a team.
| Field | Type | Meaning / relationship |
|---|---|---|
id | string | Channel id |
displayName | string | Channel name |
membershipType | string | standard, private or shared |
webUrl | string | Link to the channel |
{
"id": "<Channel id>",
"displayName": "<Channel name>",
"membershipType": "<standard, private or shared>",
"webUrl": "<Link to the channel>"
}Channel messages records
Channel messages
Posts and replies in a channel.
| Field | Type | Meaning / relationship |
|---|---|---|
id | string | Message id |
body | object | contentType and content |
from | object | Author |
createdDateTime | datetime | Time posted |
replies | array | Replies to the post |
{
"id": "<Message id>",
"body": {},
"from": {},
"createdDateTime": "<Time posted>",
"replies": []
}Chats records
Chats
One on one and group chats.
| Field | Type | Meaning / relationship |
|---|---|---|
id | string | Chat id |
chatType | string | oneOnOne, group or meeting |
topic | string | Topic |
members | array | Chat members |
{
"id": "<Chat id>",
"chatType": "<oneOnOne, group or meeting>",
"topic": "<Topic>",
"members": []
}