Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft Teams Webhook Config Deprecated #1410

Open
RyanBlakeIT opened this issue Nov 22, 2024 · 0 comments
Open

Microsoft Teams Webhook Config Deprecated #1410

RyanBlakeIT opened this issue Nov 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@RyanBlakeIT
Copy link

Describe the bug
The example given here does not work anymore after Microsoft changed over to using Power Automate instead of directly with Microsoft Teams for the Web API. As a result, it no longer works.

Provide an example

  - file: reportHTTP
    channels:
      - hijack
      - newprefix
      - visibility
      - path
      - misconfiguration
      - rpki
    params:
      templates:
        default: '{
                    "@type": "MessageCard",
                    "@context": "http://schema.org/extensions",
                    "themeColor": "d76100",
                    "summary": "BGPalerter",
                    "sections": [{
                        "activityTitle": "BGPalerter",
                        "activitySubtitle": "${channel}",
                        "facts": [{
                            "name": "Summary",
                            "value": "${summary}"
                        }, {
                            "name": "Event type",
                            "value": "${type}"
                        }, {
                            "name": "First event",
                            "value": "${earliest} UTC"
                        }, {
                            "name": "Last event",
                            "value": "${latest} UTC"
                        }],
                        "markdown": true
                    }]
                }'
      isTemplateJSON: true
      headers:
      showPaths: 0 # Amount of AS_PATHs to report in the alert
      hooks:
        default: https://[Subdomain].logic.azure.com:443/workflows/[ExtraStringsThatAreSecurityRelatedInNature]

Error message in Power Automate:

Action 'Send_each_adaptive_card' failed: The execution of template action 'Send_each_adaptive_card' failed: the result of the evaluation of 'foreach' expression '@triggerOutputs()?['body']?['attachments']' is of type 'Null'. The result must be a valid array.

This is what Copilot says about the error:
Your 'Send each adaptive card' action is failing because it is trying to iterate over a parameter that is null, specifically the 'attachments' parameter from the flow's trigger. This means that the flow is not receiving any attachments, which is likely causing the issue. To resolve this, you might want to check if the trigger is supposed to include attachments and ensure that you are referencing the correct parameter that contains the attachments, or consider adding a condition to handle cases where there are no attachments.

Expected behavior
A message is sent to the channel I specified in the Power Automate Webhook.

Are you using the binary or the source code?
Binary

Your information
Ryan A. Blake / AS10248

@RyanBlakeIT RyanBlakeIT added the bug Something isn't working label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant