Microsoft Teams integration setup
Integrating ThoughtFarmer with Microsoft Teams allows users to:
- Search the intranet directly from Teams.
- See intranet link previews within Teams conversations.
- Receive notifications about intranet activity in Teams channels.
Setup overview
To enable Microsoft Teams integration, complete the following steps:
- Create a Microsoft Teams app
- Publish the app to your organization
- Configure Microsoft Teams settings in ThoughtFarmer
- Add the ThoughtFarmer app to individual Teams
Create a Microsoft Teams App for ThoughtFarmer
Create the App
- Go to the Microsoft Teams Developer Portal and login.
- Navigate to Apps.
- Click New app.
- Enter a name for the app
- Click Create.
Configure basic information
- On the new Dashboard screen, under Basic information, fill in the required fields. If any required fields are missing, the app validation process will fail.
- Short name
- Short and long description
- Developer or company name
- Website
- Privacy policy
- Terms of use.
- Click Save.
- (Optional) Under Branding you can:
- Upload custom icons
- Choose an accent color.
Create a Bot for ThoughtFarmer in Microsoft Teams
Create the Bot
- In the Microsoft Teams Developer Portal, select Tools (pencil icon) on the left
- Open Bot Management.
- Click New bot.
- Enter a name for your bot
- Click Add.
Configure the Bot
- Under Configure, set the Endpoint address as
-
https://your-thoughtfarmer-url.com/msteams/bot- Replace your-thoughtfarmer-url.com with your ThoughtFarmer site URL.
- Replace your-thoughtfarmer-url.com with your ThoughtFarmer site URL.
-
- Click Save and wait for the confirmation message.
Generate and store a client secret
- Select Client secrets.
- Click Create your first client secret.
- Copy the generated client secret and store it securely. This secret will later be required in the ThoughtFarmer Microsoft Teams integration settings.
- Click Done.
Link the bot to your app
- Select Apps on the left-hand menu and select the app you created earlier.
- Navigate to Configure > App features > Bot.
- Select your newly created bot from the Select an existing bot dropdown menu.
- Under Select the scopes where people can use your bot, select:
- Personal
- Teams
- Click Save.
Enable link unfurls and search in Microsoft Teams
These steps will enable intranet search within Microsoft Teams and allow links pasted into a Microsoft Teams channel to unfurl, displaying details about the linked ThoughtFarmer page.
Enable message extension
- Navigate to Configure > App Features.
- Select Messaging extension.
- When prompted, select your newly created bot from the Select an existing bot dropdown menu.
Enable link unfurling
- Under Link unfurling, click Add domain.
- In the Add domain window, enter your ThoughtFarmer intranet's URL. (eg. myintranet.thoughtfarmer.com)
- Click Add.
- Click Save.
Add required domains
- Navigate to Configure > Domains.
- Click Add a domain.
- Add the URL: token.botframeworks.com.
- Add your ThoughtFarmer intranet's URL.
- Click Save.
Manifest configurations
Enable Message Handlers
- Navigate to Configure > App package editor.
- Click on the manifest.json file. This will open the file in a JSON editor.
- Add a comma after the validDomains[] node.
- Add the following value: "supportsChannelFeatures": "tier1".
- Under the composeExtensions > messageHandlers node, set the type value to link.
Enable search functionality
To enable searching, find the section composeExtensions > commands which has a default value of [], and insert this value:
{
"id": "search",
"type": "query",
"title": "Search",
"description": "Search ThoughtFarmer",
"initialRun": true,
"fetchTask": false,
"context": [
"commandBox",
"compose"
],
"parameters": [
{
"name": "query",
"title": "Query",
"description": "Your search query",
"inputType": "text"
}
]
}Click Save.
In the App package editor page, an information message will appear to update the app package. Click Update, and click Confirm.
Once these steps are complete, Microsoft Teams users will be able to search the ThoughtFarmer intranet directly from Teams and see previews of links when they are pasted in a channel.
Command title and description fields: Show in command menu when you @mention the intranet bot.
Parameter description field: Shows in the search field when you open the intranet app from ... menu
Publish the App to your organization
Once you've configured your ThoughtFarmer integration in Microsoft Teams, the final step is to publish the app so that your organization can access it.
Validate the app
- Navigate to Publish > App validation.
- Click Get Started.
- Select all of the Validation Acknowledgement checkboxes.
- Click Start Validation.
- Review the validation results and ensure there are no errors in your app configuration.
Prepare and submit the app for approval
- Navigate to the Publish > Publish to org.
- Click Publish to submit the app for approval.
- The app will now require approval from a Teams administrator within your organization.
Approve the app (admin action required)
An organization admin must complete the following steps to approve the app:
- In the Microsoft Teams Admin Center, go to Teams apps > Manage apps.
- Locate the Pending approval section.
- Find the submitted app in the list and click on it.
- Click Allow the app, then Publish it to make it available to the entire organization.
Once published, users in your organization will be able to find and install the app in Microsoft Teams.
Register app with Entra ID
Following these instructions allows admins to log in to their Microsoft Teams accounts within ThoughtFarmer, so that they can select teams and channels when setting up activity messages.
- Go to Entra ID > App registrations.
- Select the Bot you created (An auto-registration will have been created for the Bot you created).
- Open the Authentication tab.
- Click Add Redirect URI.
- Under Configure platforms, click Single-page application.
- Add the Redirect URI: https://your-thoughtfarmer-url.com/msteams/auth/complete/graphapi
- Select the checkboxes:
- Access tokens (used for implicit flows)
- ID tokens (used for implicit and hybrid flows)
- Click Save.
Configure API Permissions
- Open the API permissions tab.
- Click Add a permission.
- Select Microsoft Graph.
- Click Delegated permissions.
- Add the following permissions:
- Under User > User.Read
- Under Channel > Channel.ReadBasic.All
- Under Team > Team.ReadBasic.All
- Click Add permissions.
- Click Grant Admin consent.
Configure Microsoft Teams Settings in ThoughtFarmer
- Navigate to Admin panel: Integrations section > Microsoft Teams page.
- Under the App configuration tab, enter:
- Microsoft Tenant ID.
- The Tenant ID is your organization's ID in Microsoft Entra ID. One way to find this is to click this URL: https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/Properties
This will take you to your Microsoft Entra ID, where you can see and copy your Microsoft Tenant ID.
- The Tenant ID is your organization's ID in Microsoft Entra ID. One way to find this is to click this URL: https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/Properties
- Enter your Bot ID.
- To find your Bot ID, go to the Microsoft Developer Portal, Tools section. Click on Bot management. Copy the Bot ID beside the Microsoft Teams App Bot you created. (If you haven't generated a bot secret for the bot already, see the Create a bot heading.) Paste the Bot ID into ThoughtFarmer.
- Enter your Bot secret.
- This is the Bot secret that you created and saved during the steps under the Create a bot heading.
- Enter your Client ID. (For more information, see Client ID heading below.)
- Click Save.
- Under the Link previews and search tab, enter Search. (This is the command ID that you entered when you were enabling search for the Microsoft Teams app in the Microsoft Developer Portal).
- Click Save.
Client ID
The client ID is the ID for an Azure app that is configured to allow users to log in and ask for information about teams and channels. It can be the same as your Bot ID, your existing Microsoft Cloud Drive client ID, or a new client ID that you create. The easiest setup is generally to have the Client ID be the same as the Bot ID. Client ID is the value that makes it possible to log in to your Microsoft Teams account and select a Team and Channel when setting up an activity message.
Enable the Microsoft Teams integration
Once you have set up the Microsoft Teams integration, you may wish to set up activity messages or add security groups for link unfurls and search results before you enable the integration on your intranet. To learn more about these configuration options, see Microsoft Teams integration configuration.
Once you are ready to enable the integration, go to the ThoughtFarmer Admin panel: Integrations section > Microsoft Teams page, and turn the Enable toggle to ON.
Comments
0 comments
Please sign in to leave a comment.