-
Notifications
You must be signed in to change notification settings - Fork 132
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
Teams Incoming Webhook deprecation #878
Comments
Definitely we need this to have a new schema power automate can have adaptivecard that can be created from here https://adaptivecards.io/ |
If the current API we use is going away in October, wouldn't be better to move the |
There's no new API from msteams side, the solution provided by MS is to create a Workflow in PowerAutomate, which by default only accepts Adaptive Card message format. The workflow will generate an URL as the calling endpoint. |
It seems like if the provider starts sending an AdaptiveCard instead of the old MessageCard, the migration from incoming webhook to power automate workflows will be relatively straightforward. The current incoming webhook connector accepts both MessageCards and AdaptiveCards, so it wouldn't break the current provider/alert config. |
But is it possible to change the payload of the alert that flux will send to that webhook? If it is possible that can work and change the payload to adaptivecard then create a power automate workflow webhook for teams |
If other system administrators are having difficulties locating the affected teams: This has helped us enormously, as Microsoft does not offer its own solution for reading the affected channels and teams. We have over 350 teams in our company, which we would otherwise have had to search through manually. |
Hi, |
Hello all 👋 I will be working on this issue. I have started a draft pull request here: https://github.com/fluxcd/notification-controller/pull/920/files I'm trying to register a personal Microsoft 365 Business account for myself in order to test this inside MS Teams but I'm having some issues in this registration and am following up with Microsoft's technical and sales support. In the meantime, the Flux project would appreciate help from Azure/MS Teams users to test this PR for us. (cc @trenslow @Zheer09 @aspexdaniel) Here's a preview image for notification-controller: If you're using kustomize to deploy the Flux v2.3 components, a patch like the one below would do the trick (deploy the preview image for notification-controller and add the - target:
kind: Deployment
name: notification-controller
patch: |
- op: replace
path: /spec/template/spec/containers/0/image
value: ghcr.io/fluxcd/notification-controller:preview-a4001bad@sha256:d508e821ee3ceebb4a3da7aeca82513dc8d49fae1401067babafb560f5fb893d
- target:
kind: CustomResourceDefinition
name: providers.notification.toolkit.fluxcd.io
patch: |
- op: add
path: /spec/versions/2/schema/openAPIV3Schema/properties/spec/properties/type/enum/-
value: msadaptivecard I have deployed an HTTP server just to echo the JSON payload sent by notification-controller and I'm getting the following: {
"attachments": [
{
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"body": [
{
"items": [
{
"size": "medium",
"style": "heading",
"text": "gitrepository/flux-system.flux-system",
"type": "TextBlock",
"wrap": true
},
{
"text": "stored artifact for commit 'test notification-controller msadaptivecard provid...'",
"type": "TextBlock",
"wrap": true
},
{
"facts": [
{
"title": "summary",
"value": "msadaptivecard test"
},
{
"title": "cluster",
"value": "crystal"
},
{
"title": "revision",
"value": "main@sha1:6603cebe98dd0546a5ea70ed6ace1ac29e39be85"
}
],
"type": "FactSet"
}
],
"type": "Container"
}
],
"type": "AdaptiveCard",
"version": "1.5"
},
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null
}
],
"type": "message"
} This is how the JSON above looks like in https://adaptivecards.io/designer: Events with the It's possible that the top-level payload format |
@matheuscscp awesome work! The only issue I see with this is that the message is trimmed and in case of an error you'll not see all the details. Can you click on card in MSTeam and see the whole message? |
That's actually what notification-controller is forwarding from the client to the provider, MS Teams has nothing to do with it. See the JSON payload I posted above one more time: {
"attachments": [
{
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"body": [
{
"items": [
{
"size": "medium",
"style": "heading",
"text": "gitrepository/flux-system.flux-system",
"type": "TextBlock",
"wrap": true
},
{
"text": "stored artifact for commit 'test notification-controller msadaptivecard provid...'",
"type": "TextBlock",
"wrap": true
},
{
"facts": [
{
"title": "summary",
"value": "msadaptivecard test"
},
{
"title": "cluster",
"value": "crystal"
},
{
"title": "revision",
"value": "main@sha1:6603cebe98dd0546a5ea70ed6ace1ac29e39be85"
}
],
"type": "FactSet"
}
],
"type": "Container"
}
],
"type": "AdaptiveCard",
"version": "1.5"
},
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null
}
],
"type": "message"
} The If I send the same payload with a longer message via (Note that I also removed the single quotes from the source-controller message in my |
Ok great, errors are send in full by the controllers so no issues here! Thanks |
@matheuscscp thanks so much for your efforts! i wont have time until next week to test it, but from the screenshots it looks really good im not a go developer, but in the new code it seems if there is extra event metadata configured in the alert, e.g. other than that and what @stefanprodan asked about, theres no more open questions for me! and i look forward to being able to integrate it |
Yes |
Hello @trenslow, @Zheer09, @aspexdaniel (and any other Flux users planning to use the MS Teams provider). The solution we are implementing for addressing the deprecation of the Office 365 Connector is checking the host of the address. If the suffix Can you please check if your current URLs, i.e. the ones provided by the Office 365 Connector, have the suffix Thanks in advance for your help! |
Hello @matheuscscp from myside all the host of the address we use the suffix is as you provided |
The URLs for our Office 365 connectors also end in |
Hi Flux team,
I've been happily using the MS Teams incoming webhook functionality for quite some time now. Annoyingly, they are now deprecating the O365 connectors in favor of Power Automate Workflows.
Unfortunately, the workflow webhook request requires a different schema than the O365 connector, causing the workflow to fail.
Is it possible for Flux to implement this new schema? I guess a new Provider type would have to be created and a migration process devised. According to the first link, the O365 connector will stop working on 1 Oct. 2024, so there's a bit of time to game-plan.
Thanks for your consideration
The text was updated successfully, but these errors were encountered: