Skip to main content

Microsoft Teams new setup

Connect Microsoft Teams tools and index Teams messages through Microsoft 365. Use this guide when Teams setup shows Connect, Set up indexing, and Review setup.

Teams inherits the Microsoft 365 parent's tenant ID, not its application credentials. Tools use Glean's managed OAuth app or your own OAuth app. Indexing requires a separate Teams app with a certificate and private key.

If your screen differs, see Choose your Microsoft Teams setup. This guide doesn't configure the Glean app inside Teams or Outlook Calendar.

Prerequisites​

Before you start:

  • Have permission to add and configure connectors in the Glean Admin console.
  • Have a Microsoft 365 tenant with Teams enabled and permission to register apps in Microsoft Entra ID.
  • Arrange admin consent for the required Microsoft Graph permissions. Indexing requires a role that can consent to Microsoft Graph application permissions, such as Privileged Role Administrator. Application Administrator and Cloud Application Administrator can't grant that consent. See Microsoft's tenant-wide admin consent requirements.
  • Prepare the Microsoft 365 identity app. The suite has its own setup prerequisites and credentials.
  • Decide whether to index private chats, meeting chats, or only channel messages. Review shared-channel access limits and connector restrictions.

Open Teams setup​

  1. In the Admin console, go to Connectors and open Microsoft 365. If you haven't added the suite, click Add connector and select Microsoft 365.
  2. For a new suite, complete Set up suite using the Microsoft 365 setup guide. Click Continue to save the identity app configuration and reach Set up connectors.
  3. On the Microsoft Teams card, click Begin setup. For an existing suite, look for the card under Available for setup on Overview.

You configure at least one child connector before selecting Finish setup for a new suite. If Teams isn't available in your suite, use the setup chooser rather than recreating an existing connection.

For an existing Teams connection within Microsoft 365, use Continue setup when available to finish an incomplete setup, or Edit setup to change its configuration.

Connect​

Enter a Name for the Teams connection. Under Select an authentication method for Teams tools, choose Central or Custom.

Plan tools access before continuing

Clicking Continue configures Teams tools with their own audience settings. The indexed-content audience you choose later doesn't restrict tools to the same users. Review your intended tool access before continuing, and check those settings on the connected tools.

Use Central to connect tools with Glean's managed OAuth app. You don't create a tools app or supply its client credentials.

  1. Select Central.
  2. Click Continue to save the tools configuration.

Your Microsoft tenant's consent policies still apply. Each user authorizes their own Teams account before using tools. Saving this step doesn't sign in every user or grant tenant-wide consent on their behalf.

If Glean shows Skip in this step, you can defer tools setup. You must still configure indexing credentials in the next step.

Set up indexing​

Create a separate, single-tenant app for Teams indexing. Use the same Microsoft tenant as the Microsoft 365 parent. New setup requires certificate authentication and doesn't offer a client-secret alternative for indexing.

Register the indexing app​

  1. In the Azure portal, go to Microsoft Entra ID → Manage → App registrations → New registration.

  2. Name the app, for example Glean Teams indexing. Select Accounts in this organizational directory only (Single tenant), leave the redirect URI blank, and click Register.

  3. Open Manage → API permissions → Add a permission → Microsoft Graph → Application permissions and add these permissions:

    Application permissionPurposeWhen required
    User.Read.AllRead user profiles for identity mapping.Always
    GroupMember.Read.AllRead group membership to discover teams and map access.Always
    Team.ReadBasic.AllList teams and read team metadata.Always
    ChannelMember.Read.AllRead channel membership to enforce access.Always
    ChannelSettings.Read.AllList channels and read channel metadata.Always
    ChannelMessage.Read.AllRead channel messages and replies and subscribe to changes.Always
    Chat.Read.AllRead private and meeting chats and their membership.When you turn on Private chats or Meeting chats.
  4. Have an authorized administrator click Grant admin consent for tenant for this app. Consent for the tools or identity app doesn't grant these permissions to the indexing app.

Add certificate authentication​

Use Privacy-Enhanced Mail (PEM) encoding for both files and Public-Key Cryptography Standards (PKCS) #8 for the private key.

  1. Generate an X.509 certificate (.crt) and a matching, unencrypted PKCS#8 private key (.key), both in PEM format. You can use the certificate-generation commands in the previous setup guide.
  2. Confirm that the certificate starts with BEGIN CERTIFICATE and the private key starts with BEGIN PRIVATE KEY. A key with a BEGIN RSA PRIVATE KEY header isn't the required PKCS#8 format.
  3. In the indexing app registration, open Manage → Certificates & secrets → Certificates → Upload certificate. Upload the public .crt file. Keep the private key secure.
  4. Copy the indexing app's Application (client) ID from Overview.

Configure indexing in Glean​

In Set up indexing:

  1. Enter the indexing app's Application (client) ID. Don't enter the identity app's or tools app's ID.
  2. Under Provide the following files, click Upload certificate file (.crt) and upload the certificate. Then click Upload private key file (.key) and upload its matching private key.
  3. Choose which chats to index:
    • Private chats indexes one-on-one and group chats.
    • Meeting chats indexes messages in meeting chats, not meeting events or transcripts.
  4. Click Continue. Glean validates the indexing credentials and required permissions before you proceed.

Both chat options are off by default. Channel messages remain indexed. Before turning on either chat option, add Chat.Read.All to the indexing app and grant admin consent.

You don't enter a tenant ID in this form. Teams inherits it from the Microsoft 365 parent.

Review setup​

  1. Review What to expect, including tools and continuous indexing.
  2. If User access appears, select All users, Test group only, or None for indexed content. For Test group only, select the intended group.
  3. Click Begin indexing to start the initial crawl and apply the selected content access.
  4. If you're configuring a new Microsoft 365 suite, return to the suite and click Finish setup.

Check tool access separately. The User access selection applies to indexed content, not Teams tools.

If Skip for now appears, it postpones the initial crawl, not indexing configuration. Don't use it to apply a restricted content audience. Confirm access settings before starting indexing later.

After setup​

  • Check indexing progress on the Teams connection's Overview tab.
  • Review the Tools tab when available to manage connected tools. See Set up tools from Connectors.
  • Ask users to connect their accounts before using Teams tools. Admin consent doesn't replace each user's authorization.
  • Use Edit setup → Set up indexing to update certificate credentials or chat-indexing choices. Update the app's permissions and consent before enabling a chat category.

Message data fetching​

Real-time data fetching searches for and retrieves messages directly from Teams using each user's access. For Teams within Microsoft 365, it uses the tools OAuth app, not the certificate-based indexing app.

Configuring tools doesn't by itself enable real-time data fetching. Contact Glean Support to confirm the supported enablement path for your Teams connection within Microsoft 365. Don't apply the previous setup guide's instructions for adding delegated permissions to the crawler app to this setup.

Live chat search requires both chat-indexing options to be on, while retrieving a specific message follows the setting for that chat type. These settings don't revoke Teams tools permissions. Review message search and retrieval restrictions before choosing your chat settings.

Troubleshooting​

  • Indexing credentials fail validation: Confirm that the certificate and private key match, that the key is unencrypted PKCS#8, and that you uploaded the certificate to the indexing app in Entra ID.
  • Enabling chats fails: Add the Chat.Read.All application permission to the indexing app, grant admin consent again, and retry Continue.
  • Custom tools authorization fails: Check the client secret value, the complete delegated-permission list, tenant-wide consent, and both Web callbacks on the tools app.

For other connector errors, see Teams error codes.