Problem with webhook and MS Team like a message receiving system

Hello and thank you for support me.

->I’m using sonarqube * Community Edition * Version 9.2.4 (build 50792)
and trying to use the webhook message dispatcher with MS teams.

->i’m using MS teams with office365 license

Sonarqube is installed and running on a debian 10 linux version and are exposed with dns:

running in a intranet network so not exposed on internet.
the SSL handshake are termintated on VIP F5 that manage the dns and rounting on virtual machine debian.

i configure the webhook with the URL created from MS TEams and when a message is tried to be pushed to teams, a http 400 error is showed.

If i copy the sonarqube JSON and try to send to TEAMS with POSTMAN i receive the same http error and a message meaning that the structure of the message seems not compatible as aspected by teams. If i try to play with other JSON key, using a type declaration of the contents follows, somethings change and sometimes i show some information that guide me that the root cause is the structure of the message sent by sonarqube.

Is there some patch or suggestion to solve it?

thank you in advance

Hey there.

SonarQube doesn’t try and send a webhook in a specific format that is understood by Microsoft Teams.

You can find a community contribution that might help you below:

1 Like

Thank you Colin,

in my frenetic “googleing”, i found this content but this means that is necessary to write an API that sonarqube will use as URL of webhook, the API will convert the JSON structure in a new one compatible with MS teams and will use the MS Teams webhook URL to send message. OK i understand.
I cannot now develop a code and deploy on actual server… so i’m searching a solution by sonarqube for that. thank you