Microsoft Teams

Connect Microsoft Teams to Factory and delegate work from channel mentions using your organization's Agent Profile.

Mention @Factory in a Microsoft Teams channel to have Droid investigate, implement, and test work on a remote computer. Droid posts progress and results in the same thread.

Factory works in standard and private channels, group chats, and 1:1 chats.

You delegate directly from Teams; you do not need to create an automation. The Delegations settings control the shared Agent Profile.

A personal Microsoft Teams connector gives Droid tools to use inside a session. It does not install the Factory app in Teams or enable channel delegation.

Prerequisites

To connect and configure Teams delegation, you need:

  • A Factory organization on any paid plan, including individual plans and organization plans.
  • The Manager or Owner role in the Factory organization you want to connect.
  • Access to Settings → Delegations, including Teams app setup.
  • Permission to authorize the app for your Microsoft organization and install it in Teams. Your Microsoft administrator may need to approve it.
  • The Org Default Agent Profile, with an Environment for Dynamic compute or its own Droid Computers for Persistent compute.

Team members who delegate work need a Factory account in the connected organization. Use the same work email in Microsoft Teams and Factory so Factory can match the person making the request.

Set up the Org Default Agent Profile

Before you connect Microsoft Teams, a Manager or Owner sets up your organization's Org Default Agent Profile. It sets the model, instructions, plugins, compute, Git credentials, and connectors Microsoft Teams delegations use. Follow configure an Agent Profile, and make sure the profile has repository access for the work. Until Org Default is saved for the first time, Factory asks you to set it up when you connect an app.

Teams channel and group chat delegations run as the Agent Profile, with its Git credentials and connectors, not the sender's personal connections. A 1:1 chat with Factory runs as the person who sends it, with their personal credentials and connectors. The Org Default Agent Profile serves every request from Microsoft Teams, and is shared by every delegation app, so changes can affect more than Microsoft Teams.

Team members can set a preferred model and reasoning level under Settings → Session Defaults → Delegations. When organization policy allows it, the requester's model preference overrides the Agent Profile's model. Choose Org default to use the Agent Profile's model and reasoning settings. A personal model preference does not change the execution identity or connector access.

Connect and install the app

Linking your Microsoft tenant and installing the app in Teams are separate steps. Complete both before delegating work.

  1. 1
    Open Teams delegation settings

    In Factory, open Settings → Delegations. Under Delegation Apps, find Teams and select Set Up for Org.

    If Teams is already connected, select Configure to open its setup page.

  2. 2
    Authorize your Microsoft organization

    Select Connect on the Teams setup page. Sign in to Microsoft with an account in the tenant you want to connect and complete the consent flow.

    If Microsoft requires administrator approval, ask your Microsoft administrator to approve the app. Check that you are connecting the intended Microsoft tenant to the intended Factory organization.

  3. 3
    Finish installation in Teams

    After authorization, Factory shows Connected and opens Microsoft Teams to finish installation. Select Install App on the confirmation if Teams does not open automatically.

    Install the app in the team whose channels will receive delegation requests. If the app is blocked or unavailable, ask your Teams administrator to check app availability and policy in the Teams admin center.

  4. 4
    Verify the connection

    Return to Settings → Delegations and confirm that Teams is connected. In Teams, check that the app is installed in the intended team and available in the channel's mention picker.

    A connected tenant alone does not confirm that the Teams app is installed. Make sure the Org Default Agent Profile is configured before sending your first request.

Delegate a task from a channel

  1. 1
    Open a channel in a team where the app is installed.
  2. 2
    Start a new post and select @Factory from the mention picker.
  3. 3
    Describe the task, including the repository, desired outcome, and verification steps.
  4. 4
    Send the message.

For example:

@Factory In the storefront repository, investigate the failing checkout test. Fix the cause, run the relevant tests, and open a pull request with a summary and test results.

Microsoft Teams channel message mentioning Factory to investigate elevated rates of 500 errors, with replies in the thread
Note

Droid receives the message that mentions it, not earlier messages in the channel or thread. Include the relevant context in your request, even when you mention Factory in an existing discussion. Paste important error messages, reproduction steps, and acceptance criteria rather than referring only to "the conversation above."

Factory starts a session using the shared Agent Profile and posts status updates in the thread. For code changes, Droid is instructed to open a pull request and return its URL. Review the proposed changes and test results before merging.

Follow progress and send follow-ups

To continue the task, reply in the same thread and mention @Factory again with your instruction. For example:

@Factory Add a regression test for the empty-cart case, then rerun the checkout tests.

If Droid asks a question, mention it again in that thread with your answer. Teams does not support interactive question forms; if Droid reports that a question stopped the run, send the answer as a new mention to continue.

For shared sessions that run as the Agent Profile, only the person who started the delegation can send follow-ups or stop the task. Other channel members can read the replies, but cannot take over that session. If your organization is in the multiplayer sessions Private Preview, other members of your Factory organization can follow up in the same thread.

Start a new channel post with a new mention for a separate task. Mentions in an existing delegation thread continue its session.

Stop a running task

Select Stop on the running task's status card in Teams. Use the Teams account that started the delegation.

Stopping does not undo work already performed. Review any changes or pull requests produced before the stop.

Troubleshooting