Skip to main content

Glean Agents in Microsoft Teams

Publish a Glean agent as its own Microsoft Teams app for focused tasks, such as IT support or human resources requests. Users can ask questions and run the agent's supported tools in direct messages without leaving Teams. They can pin the app to their Teams sidebar for quick access.

Standalone agent apps work only in one-to-one direct messages, not channels or group chats. For channel replies, use the main Glean app. See Glean in Microsoft Teams: Admin guide.

Prerequisites​

Complete the following prerequisites:

  • Have access to create and publish an app through Azure and the Teams admin portals, or work with your Microsoft Teams administrator.
  • Have a Glean administrator create a Microsoft Teams App service credential and give you access to use it.
  • Have Glean in Microsoft Teams configured and enabled for the app's tenant. Creating a standalone app and credential doesn't enable the integration.
  • Publish an agent with a Chat message trigger. You must have permission to edit the agent and configure its publishing settings.
  • Give the intended users access to the agent in Glean. Installing the Teams app or granting access to its credential doesn't share the agent.

Create the app and credential​

Create a separate Teams app for the agent, then store its connection details in Glean. For a bot-only integration that doesn't sync user identities, the app registration for the bot also needs the Microsoft Graph application permission User.Read.All with admin consent. See Set up Microsoft Teams service credential.

For app creation, see Phase 1: Set up Azure Bot and Glean app. For publishing and deployment, see Phase 2: Deploy via Teams Admin Center.

Use the Personal bot scope for a standalone app. The Team scope and ChannelMessage.Read.Group permission in the main-app guide are for channel replies, which standalone apps don't support. Save the standalone app's credentials in a service credential, not in the main Glean app's Setup section.

Each app credential links to one agent at a time. One agent can use several app credentials.

Link the agent from the Admin console​

Use the credential you created rather than entering app IDs and secrets again. Linking an app from the Admin console doesn't publish pending draft edits:

  1. Go to Admin console → Embedded integrations → Glean in Microsoft Teams.
  2. Select the Microsoft Teams connector instance for the app's tenant.
  3. In the Glean Agents section, click Add agent.
  4. Select the agent and its Microsoft Teams credential. The agent picker includes only published agents with a Chat message trigger that you have permission to edit and configure for publishing.
  5. Click Save.

Messages sent to the Teams app run the agent you selected, using that agent's instructions and configured tools. For example, link an IT support agent with a ticket-creation tool so users can ask the app to create support tickets.

If a credential is unavailable, check its audience and whether another agent already uses it. The Teams admin page lists credentials for the selected connector instance.

You can also manage the same app links from the agent's sharing settings:

  1. Open the published agent in Agent builder and click Share.
  2. Under Publishing options, select Microsoft Teams.
  3. Turn on Make this agent available in Microsoft Teams.
  4. Under Select apps to deploy this agent to, select the app credential. Click Add another app to link another Teams app to the same agent.
  5. Save the sharing settings:
    • For workflow agents, click Update, then Done in the Share dialog. If Next appears instead, click it and review the agent details before confirming.
    • For autonomous agents, click Save.

In Admin console → Embedded integrations → Glean in Microsoft Teams → Glean Agents, find the app link, click its unlink control, and confirm with Unlink. This removes the app's publishing connection to the agent. Other app links remain unchanged.

Removing the app link doesn't uninstall the Teams app or delete the saved service credential. It also doesn't detach that credential from the agent's API tools.

You can also remove the app from Select apps to deploy this agent to in Agent builder and save the sharing settings. To remove the last Teams app there, turn off Make this agent available in Microsoft Teams before saving.

Use the app​

You need access to the linked agent in Glean as well as permission to install the Teams app. After your Teams administrator makes the app available to you:

  1. Open Apps in Microsoft Teams and search for the app name your administrator chose.
  2. Click Add and follow the installation prompts.
  3. Open the app and send a direct message to run the agent.
  4. Open the app's three-dot menu and select Pin to keep it in the sidebar.

If you can't find the app, ask your Teams administrator to check its availability for your account. If the app opens but doesn't respond, confirm your access to the agent in Glean. If your organization requires prior Glean sign-in, sign in to Glean before messaging the app. Standalone apps don't respond in channels or group chats.

For instructions on the main Glean app, see Glean in Microsoft Teams: User guide.

Frequently asked questions​