-
Notifications
You must be signed in to change notification settings - Fork 82
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
Deprecation warning in MS Teams #155
Comments
Unfortunately for us we just configured a load of O365 connector webhooks as we just migrated to Teams. Sure enough as soon as we're done they're being deprecated. So I was looking at using Workflows instead, I've tried to use pymsteams against a newly configured Workflow in Teams, with these settings: Workflow Step 1
Workflow Step 2
I had misplaced optimism assuming they'd just accept the same format as before since it's worded as 'When a Teams webhook request is received'. Unfortunately and perhaps predictably it errors when I try posting a card to the new webhook using pymsteams:
So I'm guessing one option would be for pymsteams to support this format, optionally initially but then default when Microsoft disables O365 connector webhooks in October? |
Tested your approach: works for me, as long as you don't increase the "version" to 1.5. 1.4 is OK. |
As a workaround, I currently use However, since HTTP status 202 is returned, pymsteams throws a TeamsWebhookException, so error handling is required. |
Thanks for that, yes that also works for me with simple cards like
|
Yeah, the plain text way works, but I wish there was a way to compose a card with |
I will try to allow a 202 error code today, I'll need to do a bit more research on this before making any decisions going forward. |
A colleague pushed a repo here https://github.com/AeroFlorian/MsTeamsAdaptiveCard which shows how to use adaptive cards to have similar functionality, maybe a similar thing could be done in the underlying code of pymsteams to recover the sections/facts etc. The readme explains how to configure the workflow and there are examples of various json and their output. I hope this can help with your research/migration |
This is probably not the best approach, but it is at least a workaround for my most critical use. My Power Automate workflow is:
The messageText variable is set with: Not a great way to prep the text for use in the JSON field below, but I have not yet found a better way in Power Automate. Then in the Adaptive Card field, I used:
This did let me at least continue using the title and text values I was trying to send. I know it's not the fault of this project or its maintainer; just a rant about MS. This whole Power Automate flow requirement is pure nonsense and adds way more complexity than is necessary. Not really sure what they're trying to solve. |
I've not really had a chance to look at this until today, but I too have a bunch of work to migrate notifications on our systems to the new automate platform. At the current moment, my organization has the new power automate workflow blocked, but I'm sure that can be done. I'd really like to have access and play around with it some before deciding what to do. The screenshots I have seen so far show what appears to be some kind of template design format, and I'm hesitant to go the direction of requiring a specific template or re-working a new adaptive card library. Who knows, it's still early. I did get an update in to allow for all return codes 200 <= x < 300. |
They could do with extending the deadline from August 15th to give us all time to implement the changes (and hopefully your updated library @rveachkc :-) ). Probably worth us all raising it with MS. Looks like there is a feedback petition to stop the retirement.. https://feedbackportal.microsoft.com/feedback/idea/80ed6877-b642-ef11-b4ad-000d3a7aba8b |
I have created an MSTeams Wrapper for AdaptiveCards for Python 2 and 3 from scratch on pure Python https://github.com/ALERTua/msteamsapi |
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. |
fyi Apprise have also supported Workflows https://github.com/caronc/apprise/wiki/Notify_workflows |
Is this still relevant? From what I can see the O365 connectors is not going away anymore. All that we needed to do to get the deprecation warning to go away and get it working was to update the connector webhook url (it just added a bit extra to end of the old connector url). |
Yes I think it is still relevant. Refreshing the URL pushes the deadline to end of 2025 but it seems it will still go away at that point. See This dev blog Update 10/16/2024: New information related to Office 365 Connectors Retirement in Teams – Webhook URL Migration
|
Describe the bug
I guess the writing is on the wall for this project. As of yesterday we started getting deprecation warnings that the teams webhook is going away and we need to migrate to MS Power Automate. The existing webhooks (O365 connectors) will only work until October 1st, so this is a rather short time to migrate, especially with the summer vacations just starting.
It also seems that we may need MS Power Automate Premium for integration with Teams, for which you obviously need to pay a per user per month fee.
I had a quick look around for something similar to pymsteams for MS Power Automate, but could not find anything. I found this guide that shows to use http post operations, which is a rather poor replacement: https://medium.com/@ronaldoscardini/how-to-integrate-your-python-automations-with-ms-power-automate-55e5d2a6c7a0
If someone found some additional information, please add it here.
The text was updated successfully, but these errors were encountered: