Microsoft Teams Bot for A-Ops
In this guide, we will showcase how to create a Teams application that allows A-Ops to interact with Teams through an A-Ops Teams bot.
Download A-Ops Teams application (.zip)
Requirements
- Teams Integration
- Administrator access to Microsoft tenancy
Prerequisite Steps:
Before creating the teams bot within Dev Teams in Microsoft, there are a few things need to be done within the A-Ops platform such as creating new user and group for the A-Ops bot to be able to authenticate to the platform.
- Navigate to System/ Integrations
- On the search Bar search for "Microsoft Teams" and click on Install
- Navigate to System / Account Management / Groups and click on Add Group:
- Add the name: aops-bot and click Create Group
- Edit the new aops-bot Group and navigate to the Roles tab
- On the Role section, enter: cluster.messages.trigger and press Add
- Navigate to the Group section and press save.
- Navigate to System / Account Management / Users and click on Add User:
- Name: aops-bot
- Username: aops-bot@
(This can be retrieved from your URL bar: https://prod-eu-west-1.a-ops.cloud/accountManagement/?tenant= ) - Add a random password. (Please note this password is not going to be used since the account is needed for creating an API key. However it is recommended that a strong password is set.)
- Edit the newly created User and navigate to the Roles & Groups tab.
- Add the user to the aops-bot group created on Step 3.
- Navigate to the Details tab and on the "Primary Group" drop-down select aops-bot and press Save
- Navigate to the API Token tab and click Regenerate.
- Store the API key of this user as it is required for the following steps
- Navigate to A conduct and Add a MS Teams Bot object,
- Store the "Bot Reference" value that can be seen within in the Advanced tab of the action
- Now since the API key and the Bot Reference have been retrieved, we would need to construct the Endpoint Address which is going to be used on the next section:
https://prod-eu-west-1.a-ops.cloud/integration/msteams/bot/<API-key>/<Bot-Reference>
A-Ops Bot Import:
- Login to https://dev.teams.microsoft.com/apps
-
Click on "Import App"
-
Once Imported, navigate to "App features" and select: Bot
-
Then, click on "Create new bot" or navigate to: https://dev.teams.microsoft.com/bots
-
Click on New Bot
-
Name the new Bot example: "aops-bot" and click on "Add"
-
Once the new bot has been added, note down the ID as it will be needed later.
-
Then Click and edit the newly created bot.
- On the Field named "Bot endpoint address" Add the Endpoint Address created on the Prerequisite Steps 7. That should look something similar to:
https://prod-eu-west-1.a-ops.cloud/integration/msteams/bot/<API-key>/<Bot-Reference>
- Navigate to the client secrets tab, and add a client secret and store the secret information. This client secret will be required to be added on the teams-bot actions that will be used as part of flows within A-Ops.
- On the Field named "Bot endpoint address" Add the Endpoint Address created on the Prerequisite Steps 7. That should look something similar to:
-
Navigate back to: https://dev.teams.microsoft.com/apps and click on the aops bot that was application that was created.
- On the tab Basic information paste in the ID that was saved on step 7.
- Navigate again to App Features, select an existing bot, the bot that was created on step 6.
-
On the section "Select the scopes where people can use your bot", Click on Personal and Team. Then click on Save.
-
Once all the information has been added publish the application to your org by navigating to "Publish to org" and clicking on Publish your App
-
This will need approval within https://admin.teams.microsoft.com/policies/manage-apps
- In teams, add a new app. Search for aops and press add. More information can be found on Add an app to Microsoft Teams