- 21 Jan 2024
- 4 Minutes to read
Microsoft Teams - Send Message
- Updated on 21 Jan 2024
- 4 Minutes to read
Microsoft Teams - Send Message posts a message to a Microsoft Teams channel for assets that match the results of the selected saved query, and match the Enforcement Action Conditions, if defined, or assets selected on the relevant Asset page.
See Creating Enforcement Sets to learn more about adding Enforcement Actions to Enforcement Sets.
- Enforcement Set name (required) - The name of the Enforcement Set. A default value is added by Axonius. You can change the name according to your needs.
- Add description - Click to add a description of the Enforcement Set. It is recommended to describe what the Enforcement Set does.
- Run action on assets matching following query (required) - Select an asset category and a query. The Enforcement Action will be run on the assets that match the query parameters.
- A query only returns results for the asset type it was created for.
- Not all asset categories are supported for all Enforcement Actions.
- See Actions supported for Activity Logs, Adapters Fetch History, and Asset Investigation modules.
- See Actions supported for Vulnerabilities.
- See Actions supported for Software.
- Action name (required) - The name of the Main action. A default value is added by Axonius. You can change the name according to your needs.
- Configure Dynamic Values - Toggle on to enter a Dynamic Value statement. See Creating Enforcement Action Dynamic Value Statements to learn more about Dynamic Value statement syntax.
These fields must be configured to run the Enforcement Set.
- Webhook URL - The incoming Webhook URL that Microsoft Teams generates for sending messages to a channel. See Generating the Microsoft Teams Incoming Webhook URL below on how to generate and add an incoming Webhook URL to a Microsoft Teams channel.
Title - A title for the message. If you do not give a title, the title will be Send Microsoft Teams Message + 'for Query:' + [query name].
Message Body - The body of the Microsoft Teams message. If you do not supply a body, this field remains empty.
Create list of predefined responses - This field is only available in an action that is added to a Workflow. Enter a list of response buttons to be shown in the Microsoft Teams message in the order that they are added into this field. Click Add to add each possible response to the list. When a response button is clicked in a Microsoft Teams message that is sent, the workflow continues based on that button.
Additional Fields - List additional fields that you want to include in the Microsoft Teams message.
Send message even if no data is returned in the query (bool, default: TRUE) - When selected, a message is generated if the query returns zero assets (including cases where 'only run on added devices' is selected and no assets were added).
Send the result in the message body - The result of the query is sent as a link by default. Select this option to send the result in the body of the message.
Send the query summary in the message body - When selected, a summary of the query is added to the message.
Verify SSL - Select whether to verify the SSL certificate of the server against the CA database inside of Axonius. For more details, see SSL Trust & CA Settings.
HTTPS proxy - Connect the value supplied in Webhook URL to a proxy instead of directly connecting it to the value supplied in Webhook URL.
Generating the Microsoft Teams Incoming Webhook URL
To add an incoming webhook to a Microsoft Teams channel and acquire the correct webhook URL
- Sign into teams.microsoft.com with a user that has permissions to the channel you want to use for notifications. You add the incoming webhook to this channel.
- In Teams, select Settings > Member permissions > Allow members to create, update, and remove connectors, so that you can add, modify, or delete a connector.
- Open the channel, click the 3-dot menu in the upper-right corner, and select Connectors.
- In the Connectors dialog that opens, type incoming webhook in the Search bar.
- Near Incoming Webhook, click Add, and in the screen that opens, click Add again to install the app.
- Near Incoming Webhook, click Configure, and name your webhook with a name, in our case, Axonius. Optionally, click Upload Image to upload a different image.
- Click Create.
- Your Incoming Webhook named Axonius has been created and it has been integrated with the Microsoft Teams channel you have chosen. The webhook URL is displayed in the box.
- Paste the URL into the Webhook URL field in this EC action. This is the endpoint URL that you require to send data to Microsoft Teams.
- Click Done. The webhook is now available in the Microsoft Teams channel.
For more details about other Enforcement Actions available, see Action Library.