Issue with Sending Webhook to Microsoft Teams via Alert rule

Dear expert

I am experiencing an issue when trying to send a webhook to Microsoft Teams using Morpheus Data from the alert rule.

The webhook works when tested via Postman

When trying to configure the same webhook in Morpheus Data, I receive the following error:

ERROR
05/20/2024 06:46:53 PM [appJobHigh-7] WebUtility: unable to post url not found or had a problem
ERROR
05/20/2024 06:46:53 PM [appJobHigh-7] error: Summary or Text is required.

I have also reviewed the Morpheus Data documentation but did not find specific guidelines related to setting up webhooks. Any insights or guidance on resolving this issue would be greatly appreciated.

Regards,
Pavan

I’ve tested in 6.2.8 and it works on my appliance with a local debugging server. I can see the request body automatically populated

2024/05/22 13:10:17 referrer= remote-ip=10.32.20.172:44166 user-agent=Java/11.0.20 url=/ host=10.32.20.172:9090 method=POST body={"subject":"WARNING: Incident Opened for Test morpheuslab.","message":"An Incident of severity 'WARNING' was opened for Check: Test morpheuslab on 2024-05-22 13:08:48.0"}

Check the connectivity between the appliance and the hook endpoint, can you make a POST request to your webhook using CURL on the appliance?

Hi @Ollie_Phillips,

Thank you for the prompt response.

I am currently using Morpheus Data version 7.0.1.

This issue is now resolved. I added the Microsoft Teams webhook URL in the Slack hook configuration. As a result, I am now receiving alerts on the Microsoft Teams channel.

However, I am receiving a limited response:

Now, I am trying to add a Power Automate flow webhook URL to modify alerts and direct them to the respective developer with alert details. But I am encountering the following error:

ERROR
05/22/2024 07:13:40 PM appliance [appJobHigh-12] WebUtility: unable to post url not found or had a problem
ERROR
05/22/2024 07:13:40 PM appliance [appJobHigh-12] error: {"error":{"code":"DirectApiAuthorizationRequired","message":"The OAuth authorization scheme is required. Please add authentication scheme and try again."}}

If you are aware of the solution or have any clues, please assist.

Best regards,
Pavan

Looks like maybe need to authenticate. Many Webhooks will expect a token as part of the request querystring, but if it is to be supplied as a request header you may have some difficulty as headers cannot be set on the request at the current time.

@Ollie_Phillips,

Right, but I do not see any option in Morpheus for adding request headers in the webhook configuration.

Yes, as I said it’s not possible to add request headers at this time. If this is something you need please consider adding it as an idea in that section of the forum.

Ok, Ollie, thanks for the information. I will consider adding it as an idea in the forum.

Best regards,
Pavan