Post to Office365 Connector
Send messages to Microsoft Teams and Office 365 Groups
First up, you need to access the connectors for either Microsoft Teams or Office 365 create yourself an incoming webhook.
Once the webhook is set up, copy the webhook URL to the corresponding field in the build/release task.
For the other fields, you are able to use markdown syntax, as well as build variables, to fully customize your message.
Source is available on GitHub