Overview
Microsoft Teams is a cloud-based collaboration and communication platform within the Microsoft 365 ecosystem. It is commonly used by organizations to enable real-time messaging, video conferencing, file sharing, and team collaboration across departments and projects.
The Microsoft Teams integration within the Wrk platform allows you to automate communication and collaboration workflows by calling the Microsoft Graph Teams API directly through prebuilt Wrk Actions.
This document provides an overview of how Microsoft Teams integrates into Wrk, how authentication works, general API behaviour, and a full list of available Wrk Actions.
Authentication
When connecting Microsoft Teams via OAuth 2.0 :
Create a new Microsoft 365 Connected Account in Wrk.
Sign in using your Microsoft 365 account.
Review and approve the requested permissions.
Select the tenant and organization Wrk should access.
General API Behaviour
Microsoft Graph API Overview
The Teams integration uses the Microsoft Graph REST API.
Teams resources are represented across multiple object types, including:
Team — top-level collaboration container
Channel — conversation streams within a team
Chat — private or group messaging thread
ChatMessage — individual messages within chats or channels
User — Microsoft 365 identity object used for mentions and membership
Common properties include:
id — unique identifier
displayName — name of team/channel/chat
createdDateTime — creation timestamp
webUrl — browser-accessible link to the resource
description — optional metadata description
Pagination
Large collection responses are paginated automatically.
Microsoft Graph returns an @odata.nextLink property when additional pages are available. To retrieve the next page of results, pass the provided nextLink URL into the subsequent request.
Example:
"@odata.nextLink": "https://graph.microsoft.com/v1.0/teams/{team-id}/channels?$skiptoken=..."
Important Notes
Pagination tokens are opaque and must not be modified.
Result sizes vary depending on tenant configuration and endpoint.
Large teams should always be queried using paginated requests.
Filtering and Query Parameters
Microsoft Graph supports OData query parameters for shaping responses.
Common parameters include:
$select— return only specified fields$filter— filter returned records$top— limit number of returned items$orderby— sort results$expand— include related resources inline
Example:
?$select=id,displayName,description,createdDateTime
Message Structure Notes
Teams messages support rich formatting including:
HTML-based message body content
Mentions using user IDs
Attachments (cards, files, adaptive cards)
Reactions (like, heart, etc.)
Example message body includes:
contentType: HTML
content: formatted message string
Rate Limits & Throttling
Microsoft Graph enforces throttling across Teams APIs.
Requests may return
429 Too Many RequestsRetry-after headers should be respected
Bulk operations should be batched where possible
Available Wrk Actions
Create channel message post in Microsoft 365 Teams
Reply to a message in a channel in Microsoft 365 Teams
Retrieve all channels from Microsoft 365 Teams
Retrieve channel messages from Microsoft 365 Teams
Retrieve channels for a specific team from Microsoft 365 Teams
Retrieve message replies from Microsoft 365 Teams
Retrieve teams from Microsoft 365 Teams
Send message in chat in Microsoft 365 Teams
Set reaction to a message in channel in Microsoft 365 Teams
Set reaction to a message in chat in Microsoft 365 Teams
Additional Resources
Authentication: https://learn.microsoft.com/en-us/graph/auth/
Query Parameters: https://learn.microsoft.com/en-us/graph/query-parameters
Pagination: https://learn.microsoft.com/en-us/graph/paging
