Creating a Microsoft Teams integration

A Microsoft Teams integration lets you and your team use collaborative ChatOps features to receive incident notifications. You can only connect to one ChatOps tool at a time, so if you already configured another ChatOps integration (such as Slack), you cannot connect to Microsoft Teams.

Prerequisites

Before you set up your Microsoft Teams integration, you must create your Azure Bot, and configure the Microsoft Teams application to communicate with IBM Cloud Pak for AIOps. For more information about configuring Microsoft Teams applications for IBM Cloud Pak for AIOps, see Configuring Microsoft Teams applications for integration.

Important: If you have an offline (air-gapped) deployment of IBM Cloud Pak for AIOps or an environment that uses a proxy server, then you cannot use the ChatOps Microsoft Teams integration. The use of a proxy with the ChatOps Microsoft Team integration is not supported.

Note: If the URL of the on-premises IBM Cloud Pak for AIOps instance can't be accessed by Microsoft Teams, you can use Secure Tunnel to expose the IBM Cloud Pak for AIOps instance to either a cluster (Red Hat OpenShift or IBM Kubernetes Service cluster) or a host machine (virtual machine or physical machine), which is accessible from the public network. Then, you can get a URL that can be accessed by Microsoft Teams. For more information about Secure Tunnel, see Using Secure Tunnel for ChatOps.

For more information about HTTP headers for the various credential types, see HTTP headers for credential types.

Creating a Microsoft Teams integration

Note: To implement your Microsoft Teams integration, you need the Client Secret and ID information available either from Microsoft Teams or Microsoft Azure. Follow the steps that are outlined in Configuring Microsoft teams application for integration to acquire these variables.

To create a Microsoft Teams integration, complete these steps:

  1. Log in to IBM Cloud Pak for AIOps console.

  2. Expand the navigation menu (four horizontal bars), then click Define > Integrations.

  3. On the Integrations page, click Add integration.

  4. From the list of available integrations, find and click the Microsoft Teams tile.

    Note: If you do not immediately see the integration that you want to create, you can filter the tiles by type of integration. Click the type of integration that you want in the Category section.

  5. On the side-panel, review the instructions and when ready to continue, click Get started.

    Microsoft Teams integration
    Figure. Configure Microsoft Teams integration

  6. On the Add integration page, define the general integration details:

    • Name: The display name of your integration.

    • Description: An optional description for the integration.

    • Microsoft App ID: Token for the bot that is associated with the app that is installed in a channel. You can copy this value from the Microsoft APP ID field on the Microsoft Teams Settings > Configuration page.

    • APP Password: Enter the Azure Bot client secret for the integration.

      Microsoft Teams integration
      Figure. Create Microsoft Teams integration

    • Language ID: Select your language from the drop-down list.

    • Proactive channel: The channel ID for the channel that you want to use for notifications (from change risk, for example). For more information about obtaining channel ID values, see Obtaining links to your channels.

    • Reactive channel: The channel ID for the channel that you want to use for incidents and alerts. For more information about obtaining channel ID values, see Obtaining links to your channels.

      Microsoft Teams integration
      Figure. Microsoft Teams integration

    Click Next.

    Important: On the optional Configure Proxy page, do not toggle the Enable Proxy selection to configure a proxy. This does not work for Microsoft Teams integrations. For more information, see Known Issues.

    You can test your integration by clicking Test connection.

    Microsoft Teams integration
    Figure. Test connection

    Note: Your secret must be fully registered on Microsoft Azure for the integration to pass. If you test your integration immediately after creating the secret, wait a couple of minutes, then try again.

  7. Click Save.

You have created a Microsoft Teams integration in your instance. Unlike a log or event integration, you do not need to enable a ChatOps integration after creating it. Once you create the integration and set up Microsoft Teams, you can verify that everything is working by issuing test commands in Microsoft Teams. For more information about verifying your integration, see Enabling your bot and adding it to your channel.

To create more integrations, see Configuring Integrations.

For more information about working with the insights provided by your integrations, see ChatOps insight management.

Connecting the Azure Bot to IBM Cloud Pak for AIOps

Before you can finish implementing your Azure Bot in Microsoft Teams, you must create your integration at the instance level in IBM Cloud Pak for AIOps. Creating an integration in IBM Cloud Pak for AIOps provides the URL for the messaging endpoint. After this step, you can edit the Microsoft Teams integration to complete setting it up, but the URL for the messaging endpoint is required to complete your Azure Bot registration.

  1. Create a Microsoft Teams integration.

  2. From the Cloud Pak for AIOps console, click the navigation menu (four horizontal bars), then click Define > Integrations.

  3. Click the Microsoft Teams integration type in the Manage integrations tab. On the Microsoft Teams page, copy the request URL from the Details column. This URL is required to enable two-way communication between Microsoft Teams and IBM Cloud Pak for AIOps.

    Note: If you used Secure Tunnel to expose the IBM Cloud Pak for AIOps for Microsoft Teams integration, you need to replace the request URL with the application mapping URL.

    To get the application mapping URL, go to Administration > Secure Tunnel from the navigation menu (four horizontal bars). On the Manage integrations tab, find the tunnel integration, and click the integration name. In the Application mappings page, copy the application mapping URL from the IBM Cloud Pak for AIOps mapping URL field. For more information, see Viewing Secure Tunnel.

  4. Log back into your Microsoft Azure home page Opens in a new tab and navigate to the Configuration section of your Azure Bot resource.

  5. Paste the request URL from the Details column of the IBM Cloud Pak for AIOps Microsoft Teams instances page into the Messaging endpoint field on the Configuration section of your Azure Bot resource in Microsoft Azure. Click Save.

Enabling your Azure Bot and adding it to your channel

After you set up your Microsoft Teams integration, you can download the Microsoft Teams Azure Bot through the instance interface in the IBM Cloud Pak for AIOps console.

Note: The same Azure Bot must be added to both your reactive and proactive channels.

To download the Azure Bot, complete the following steps:

  1. Log in to IBM Cloud Pak for AIOps console.

  2. Expand the navigation menu (four horizontal bars), then click Define > Integrations.

  3. On the Microsoft Teams tile, click 1 instance.

  4. On the Microsoft Teams instances page, click the options menu (three vertical dots), then click Download bot app. Save IBM_Cloud_Pak_AIOps.zip to an accessible local directory.

  5. Log in to Microsoft Teams to upload your Azure Bot to your channel. Click Apps in the sidebar.

  6. Click Upload a custom app. Select the compressed file that you downloaded. The IBM Cloud Pak for AIOps Azure Bot appears in the Built by your org section.

  7. Click the IBM Cloud Pak for AIOps tile, then click Add.

  8. The tile is on the Apps page. Click the IBM Cloud Pak for AIOps tile on the Apps page. The IBM Cloud Pak for AIOps details page opens.

  9. Click the drop-down arrow next to Open, then click Add to a team. Select the team that you designated to be the appropriate channel to post to (either your reactive or proactive channel). Click Set up a bot.

You have edited your integration.

The channel that you set up opens and the Azure Bot is fully functional.

You can verify that everything is operating as expected by issuing the welcome command for the Azure Bot in Microsoft Teams:

  • @<bot_name> /waiops_welcome: provides a welcome message about using the bot, where bot_name is the name of your Azure Bot.

Editing a Microsoft Teams integration

After you create your integration, you can edit the integration. For example, if you want to change which channel your proactive messages are routed to, you can edit it. To edit a integration, complete the following steps:

  1. Log in to IBM Cloud Pak for AIOps console.

  2. Expand the navigation menu (four horizontal bars), then click Define > Integrations.

  3. Click the Microsoft Teams integration type on the Manage integrations tab of the Integrations page.

  4. On the Microsoft Teams integrations page, click the name of the integration that you want to edit. Alternatively, you can click the options menu (three vertical dots) for the integration and click Edit. The integration configuration opens.

  5. Edit your integration. Click Next to go through the integration configuration pages.

    Microsoft Teams integration
    Figure. Edit Microsoft Teams integration

  6. Click Save when you are done editing.

Note: Updating a ChatOps integration with a new Microsoft Teams Azure bot can result in disconnected ChatOps incidents. Existing incidents that were posted by a different bot do not receive any more updates. You are recommended to use the same bot resource when possible.

Deleting a Microsoft Teams integration

If you no longer need your Microsoft Teams integration, you can delete the integration from the console.

To delete a integration, complete the following steps:

  1. Log in to IBM Cloud Pak for AIOps console.

  2. Expand the navigation menu (four horizontal bars), then click Define > Integrations.

  3. Click the Microsoft Teams integration type on the Manage integrations tab of the Integrations page.

  4. On the Microsoft Teams integrations page, click the options menu (three vertical dots) for the integration that you want to delete and click Delete.

  5. Enter the name of the integration to confirm that you want to delete your integration. Then, click Delete.

Your integration is deleted.