OfficeDev / Microsoft-Teams-Samples

Welcome to the Microsoft Teams samples repository. Here you will find task-focused samples in C#, JavaScript and TypeScript to help you get started with the Microsoft Teams App!
MIT License
999 stars 770 forks source link

Sample 'Sequential Flow with Adaptive Cards' (C#) not working in Teams Channel but in Group Chat #1246

Open Jan1503 opened 6 months ago

Jan1503 commented 6 months ago

Hi there!

The provided sample bot-sequential-flow-adaptive-cards does not work correctly when added to a Teams Channel. It works when added to a group chat.

In a channel, the messages are sometimes not delivered to my web-app (Azure Windows App-Service). I've also added another bot with the "bot-request-approval" sample to a channel (after modifying its manifest) and it also does not work.

Sometimes it sends the first message, sometimes it doesn't. It also looks like the "refresh" (Refresh-Model for Adaptive Cards) for different users is not called in a Teams Channel. In a group chat all is working as expected.

I'm sorry that I don't have a better explaination or any logs. Please tell me what you need to investigate this issue.

Thanks!

Prasad-MSFT commented 5 months ago

Thanks for raising your issue. We will check this at our end and will update you accordingly.

Prasad-MSFT commented 5 months ago

Hi @Jan1503 - We tested this sample from our side and also observed the same behaviour. This doesn't work in teams channel scope. However, it works in group chat scope. Seems like card is not getting refreshed in team's channel scope.

Team's channel: image

Group chat: image

We will check this with concerned team and will get this fixed. We will inform in this thread once we have any update.

Thanks again!

Jan1503 commented 5 months ago

I just tested this in classic Teams and initially got better results but some refreshs are also missing.

I think the code is ok and it's a Teams (v2) issue.

Even a completely new bot created with the Teams toolkit shows the same behaviour. The refresh-model seems to break if used in a Teams channel.

Jan1503 commented 5 months ago

Another small update: I opened Teams v2 in webclient with User B and submit an approval request from User A using Teams desktop client (classic or v2 doesn't matter).

User B does not receive the updated card in v2 webclient. As soon as I switch webclient to classic, adaptive card get's updated correctly.

If I then switch back to v2, same old adaptive card is shown. Very weird.

So its working in classic Teams but not in v2.

Jan1503 commented 5 months ago

Found this with no answer: adaptive card is not getting updated in new team client

Prasad-MSFT commented 5 months ago

Hi @Jan1503 - We have raised a bug for the same. We will inform you once we get any further update from engineering team.

Thanks!