# Ask in Teams

> Link your Teams account once, then ask Corfedo AI about your code in a 1:1 chat with the app or by mentioning it in a channel.

Source: https://docs.corfedo.ai/use/ask/teams/

When your workspace has the Teams integration, you can ask Corfedo AI from Microsoft Teams. Answers use your own Corfedo access, so they read only code you may read.

## Before you begin

- An administrator has added Corfedo to your Microsoft organization, see [Microsoft Teams](https://docs.corfedo.ai/workspace/integrations/teams/).
- You can sign in to the Corfedo workspace.

## Link your account

### Ask your first question

In Teams, open the app store, find the app under **Built for your org** and select **Add**. Ask it a question in the chat, such as "How does acme/payments retry a failed charge?". The first time, the app replies with **Link account**. The link works for 10 minutes.

![Link prompt in Teams](https://docs.corfedo.ai/images/integrations/teams/teams-link-prompt.png)

### Confirm in Corfedo

Select **Link account** and sign in to Corfedo if asked. Corfedo shows the organization and account it links. Select **Continue to Microsoft** and sign in as that account.

![Link your Teams account](https://docs.corfedo.ai/images/integrations/teams/link.png)

### Ask again

The page says **Account linked**. Ask your question again in Teams.

**Check:** Corfedo AI answers in a thread under your question.

![Answer in a 1:1 chat](https://docs.corfedo.ai/images/integrations/teams/teams-answer.png)

## Ask and follow up

| Where | How |
| --- | --- |
| 1:1 chat | Write to the app. Each question starts its own thread, unless your administrator turned threads off. |
| Channel | Mention the app, such as `@Corfedo how do we sign outgoing webhooks?`, in a channel your administrator enabled. The answer appears in the thread. |
| Microsoft 365 Copilot | Choose the app as an agent, see [Ask in Microsoft 365 Copilot](https://docs.corfedo.ai/use/ask/copilot/) |
| Follow-up | Reply in the same thread. The thread is one conversation, and one question is answered at a time. |

A channel answer uses your access, and everyone in the channel can read it. Ask in a 1:1 chat when the answer may include code others cannot see. Questions run with the profile and repositories your administrator chose for Teams, not with your choices in the browser.

![Answer in a channel thread](https://docs.corfedo.ai/images/integrations/teams/teams-channel-answer.png)

## Unlink your account

Open **Connections** in the menu under your name. Under **Linked accounts**, select **Unlink**. Your next question in Teams asks you to link again.

## Troubleshooting

When Corfedo cannot answer, it says why. In a channel, only you see the reply. If Teams does not allow that, the app says it sent the reply in your 1:1 chat.

| Reply | Why | What to do |
| --- | --- | --- |
| "This link expired. Send me a message to get a new one." | The link is older than 10 minutes | Send another message |
| "I answer only in a 1:1 chat with me." | Mentions are off | Ask in a 1:1 chat |
| "I don't answer in this channel." | This channel is not enabled | Ask in a 1:1 chat, or ask an administrator to add the channel |
| "I don't answer in group chats." | Group chats are not enabled | Ask in a 1:1 chat |
| "I can't answer yet." | The integration has no profile | Ask an administrator to finish the setup |
| "I can't answer you." | You may not use the integration's profile | Ask an administrator to check your access |
| "You have reached your monthly AI spending limit." or "Your workspace has reached its monthly AI spending limit." | The monthly limit is used up | Wait for next month, or ask an administrator |
| **Link request expired** or **Different account** | The link is too old, or you signed in as another account | Ask again in Teams for a new link, and sign in as the account that asked |
