For administrators

Microsoft Teams

The Teams bot your organisation sets up: it messages people directly, carries the same buttons as Slack and lets published apps post to the channels you allow. cyantula uses one chat app at a time for its own messages, Slack or Teams. Optionally one channel webhook for alerts.

What this is

The Teams bot is how cyantula reaches people in Teams and how they answer its cards with buttons. You create it in your own Microsoft account, so it belongs to your organisation. Published apps that opted in can also post into the Teams channels you allow. Optionally, one channel gets alerts through a webhook.

You need this page when you use Teams instead of, or next to, Slack. cyantula uses one chat app at a time for its own messages. The choice is made on the Slack page.

Where to find it

  1. Open Admin.
  2. Click the card Notifications, then Microsoft Teams.

What you see

From top to bottom:

Which chat app is in use. A note says through which app cyantula sends its own messages, with a yellow warning when the choice and the setup disagree.

Set up the bot. A folded part, open while no application ID is saved. It has the four steps below, with this installation's own addresses filled in, and the button Test bot connection.

The test card. Send a test message posts one card into the channel with the saved webhook address. Send me a test message sends a card to you in Teams through the bot. You must be connected yourself (see your Profile). Both are greyed out with unsaved edits ("Save first: the test uses the saved address.").

Re-check Teams links. Installs the app and opens the chat for everyone not connected yet. Nobody who paused Teams is touched, and nothing is sent.

Teams and channels. A folded part, open once a team is added. See below.

The settings:

  • Teams channel webhook address: optional. In Teams, open the channel, then ⋯, Workflows, Post to a channel when a webhook request is received, and paste the address it gives you. The address is the key to the channel, so it is stored encrypted. Empty means nothing is posted to Teams.
  • Post findings in the channel from: critical, high, medium, low or off. It only filters vulnerability findings: those of this severity or worse go into the channel. The channel gets vulnerability alerts and server alerts only, never personal messages (access requests, approvals, new apps). Server alerts are always posted. off means no vulnerability findings.
  • Teams bot application (client) ID: from the Microsoft Entra app registration, Overview, Application (client) ID.
  • Teams bot client secret: Entra app registration, Certificates & secrets, the secret's Value (shown once when you create it). Stored encrypted. Without it the bot cannot sign in to Microsoft.
  • Microsoft tenant (directory) ID: Entra app registration, Overview, Directory (tenant) ID. Empty uses the tenant of the Microsoft sign-in provider, when there is one.
  • Find people by email: only for people who do not sign in with Microsoft. Normally cyantula knows who someone is in Teams from their Microsoft sign-in. On, it also looks people up in your Microsoft directory by email address and uses the answer only when exactly one account matches. Needs the User.Read.All permission. Off by default, because an email match is a guess.

Behind Show N rarely-used: Teams messages one app may post per day; 0 means no limit. It needs the Teams bot to be set up.

At the bottom: Save (Save N changes once you edit something), Discard, and Show N rarely-used.

How to set up the bot

It takes about ten minutes and needs someone who can administer Microsoft Entra, Azure and the Teams admin center.

  1. Register an app in Microsoft Entra. Open App registrations, New registration. Name it cyantula and choose Accounts in this organizational directory only (single tenant). On its Overview page copy the Application (client) ID and the Directory (tenant) ID into the fields on this page. Then open Certificates & secrets, New client secret, and copy the secret's Value into Teams bot client secret. Click Save.
  2. Create an Azure Bot. In the Azure portal create an Azure Bot: Type of App: Single Tenant, Creation type: Use existing app registration, with the IDs from step 1. Open Configuration and set the messaging endpoint to the address under Copy endpoint in the guide. Then open Channels and add Microsoft Teams. The endpoint is where Teams delivers button presses and messages to cyantula.
  3. Grant the permissions. In the app registration open API permissions, Add a permission, Microsoft Graph, Application permissions. Add TeamsAppInstallation.ReadWriteSelfForUser.All and AppCatalog.Read.All. Add User.Read.All only for Find people by email. Add Team.ReadBasic.All, Channel.ReadBasic.All and TeamsAppInstallation.ReadWriteSelfForTeam.All only for Teams and channels. Then have a global administrator approve them with the link under Copy consent link. If adding the app for the first test person fails with a permission error, grant TeamsAppInstallation.ReadWriteForUser.All instead of the first one. It is broader: it lets cyantula install any app from your catalog for any person.
  4. Upload the app in Teams. Click Download Teams app package. Open the Teams admin center, Manage apps, and choose Upload new app.
  5. Click Test bot connection. It signs in as the bot and checks the permission. It sends no message.

You know it worked when a green box says "The bot is ready." Each check is listed with a tick or a cross. If the application ID is not saved yet, the package button is replaced by "Save the application ID first: the package is made for that bot." and the consent link by a note to save the IDs.

How people get connected

Nobody matches accounts by hand. cyantula finds a person through their Microsoft sign-in and installs its app for them. After you fix permissions, click Re-check Teams links. The result reads, for example, "12 connected, 1 blocked the app, 0 with a problem, 3 left as they were", and may add that more are waiting: run the check again. Colleagues see their own state on their Profile, under Teams.

How to let apps post in channels

  1. Set up and save the bot first. Without it everything under Teams and channels is greyed out and a yellow note says so.
  2. Open Teams and channels. Type the start of a team's name, or paste its ID, and click Search. Click Add next to the team.
  3. Click Add the app to this team. The bot can only post in a team it has been added to. A green message says how many channels were found. The team shows App added.
  4. Tick the channels apps may use. Private and shared channels are not offered. After channels change in Teams, use Refresh channels.

Each channel tick is saved at once, with a message such as "Apps may now post in …". Owners can narrow the list further on the Teams page of their app.

How to send alerts to one channel

  1. Create the workflow in Teams as described under Teams channel webhook address and paste the address.
  2. Choose the lowest severity under Post findings in the channel from.
  3. Click Save, then Send a test message. A green message says "Sent: the test message should show up in the channel in a moment."

How to stop using a team

  1. Click Remove on the team.
  2. In the window Stop using the team, read that apps can no longer post to its channels and that the cyantula app stays installed in the team, then click Stop using.

When something looks wrong

  • "The bot set-up guide could not be loaded. Reload the page to try again." and "“Teams and channels” could not be loaded…": reload the page.
  • "Could not ask the server to test the bot. Try again in a moment.": the test did not run. Try again.
  • Red lines after Test bot connection: each names the failed check and why. Fix the registration, the secret or the permission and test again.
  • "Set up and save the bot first: nothing here works without it.": fill in and save the ID, secret and tenant first.
  • "No team's name starts with that.": the search matches the start of the name. Try less, or paste the team ID.
  • "There are more teams than this. Type more of the name to narrow it down.": refine the search.
  • App not added yet on a team: click Add the app to this team.
  • "No channels yet: use “Refresh channels”.": refresh. Private and shared channels are never offered.
  • Send me a test message fails: you are probably not connected yourself. Check your own state on your Profile.
  • A test result disappears when you edit or save: it described the old values.
  • Refused: … under a field after saving: the value was not accepted. The text says why.

Good to know

  • Only administrators can change this page, and the steps at Microsoft need someone who can administer Entra, Azure and Teams.
  • Apps can post to the allowed channels whichever chat app carries cyantula's own messages, as long as the bot is set up.
  • Remove on a team does not uninstall the cyantula app from it. Do that in Teams.
  • The permission TeamsAppInstallation.ReadWriteForUser.All is broader than the default. Grant it only if the narrow one fails.