What You'll Set Up
By the end of this guide, your AI agent will be able to work with Microsoft Teams on your behalf. It can manage teams and channels, send and read messages, participate in chats, manage members, and work with tabs and apps — all through a simple conversation.
This integration is especially useful for organizations that rely on Microsoft Teams for internal communication and collaboration. Instead of switching between apps and manually managing channels, your agent handles it directly.
Before You Begin
Make sure you have:
- A Microsoft 365 account with Teams enabled
- Azure AD admin access — You need permission to register applications in your organization's Azure Active Directory
- A Pipeworks workspace — Sign up at pipeworks.ai if you haven't already
Azure AD app registration requires admin-level access to your organization's Azure portal. If you don't have this, ask your IT administrator to complete the Azure setup steps for you.
Steps
Register an app in Azure AD
Go to the Azure Portal and navigate to Azure Active Directory > App registrations > New registration.
Fill in the registration form:
- Name — Enter something descriptive like "Pipeworks Teams Integration"
- Supported account types — Select the option that matches your organization (single tenant is most common)
- Redirect URI — Leave blank for now
Click Register to create the app. You'll be taken to the app's overview page. Copy the Application (client) ID and the Directory (tenant) ID — you'll need both in a later step.
Create a client secret
In your newly registered app, go to Certificates & secrets in the left sidebar. Click New client secret.
- Description — Enter "Pipeworks" or similar
- Expires — Choose an expiration period (24 months recommended)
Click Add. Copy the secret Value immediately — it won't be shown again after you leave this page.
Copy the client secret value right away. Azure only shows it once. If you lose it, you'll need to create a new one.
Configure API permissions
In the left sidebar, go to API permissions > Add a permission > Microsoft Graph.
Select Application permissions and add the permissions your agent needs for Teams. Common permissions include:
Team.ReadBasic.All— Read team infoChannel.ReadBasic.All— Read channel infoChannelMessage.Read.All— Read channel messagesChat.Read.All— Read chat messagesChat.ReadWrite.All— Send chat messagesTeamMember.Read.All— Read team membersTeamsTab.Read.All— Read tabsTeamsAppInstallation.ReadForTeam.All— Read installed apps
After adding the permissions, click Grant admin consent for your organization. This requires admin privileges.
Only add the permissions your agent actually needs. You can always come back and add more later.
Open your Pipeworks console
Log into your Pipeworks workspace and go to the Integrations page. Find Microsoft Teams in the list and click on it.
Enter your Azure AD credentials
Paste your credentials into the corresponding fields:
- Azure AD Client ID — The Application (client) ID from step 1
- Azure AD Client Secret — The secret value from step 2
- Azure AD Tenant ID — The Directory (tenant) ID from step 1
Click Connect.
Pipeworks encrypts your credentials with AES-256-GCM before storing them. The plaintext is never saved to disk and is only decrypted when your integration container starts.
Start the integration
Click Start to launch the Microsoft Teams integration container. This takes a few seconds. Once the status shows Running, your agent is ready to work with Teams.
Test the connection
Use the Test button in your Pipeworks console to verify the connection. This sends a simple request to confirm your Azure AD credentials are working and your app has the right permissions.
What Your Agent Can Do
Once connected, your AI agent has access to 25 tools covering:
- Teams — List, create, and manage teams in your organization
- Channels — Create and manage channels within teams
- Messages — Send and read messages in channels
- Chat — Participate in one-on-one and group chats
- Members — View and manage team and channel members
- Tabs — Work with tabs in channels
- Apps — Manage app installations within teams
Connecting from Your AI Agent
Add the Pipeworks tools endpoint to your agent's configuration. Here's an example for Claude Desktop:
{'{'}
"mcpServers": {'{'}
"pipeworks-teams": {'{'}
"command": "npx",
"args": ["-y", "mcp-remote", "https://app.pipeworks.ai/tools/teams"]
{'}'}
{'}'}
{'}'}
Claude Desktop will prompt you to sign in through Pipeworks when you first connect. No access key needed.
Troubleshooting
Connection test fails? Double-check that all three credential fields are correct — the Client ID, Client Secret, and Tenant ID must all match what's shown in the Azure Portal.
Getting "insufficient privileges" errors? Make sure you granted admin consent for the API permissions in step 3. Without admin consent, the permissions are listed but not active.
Client secret expired? Azure AD client secrets have an expiration date. Go to Certificates & secrets in the Azure Portal, create a new secret, and update it in your Pipeworks console.
Agent can't find tools? Verify your Pipeworks session is authenticated and that the integration status shows "Running" in your Pipeworks console.