Forum Discussion

RajpurohitAditya's avatar
RajpurohitAditya
Copper Contributor
Dec 10, 2024

Chatbot Chat History Issue When Integrated with Microsoft Teams

Hello Community,

I have developed a chatbot application where I manage chat history using session-based storage. The chatbot works seamlessly on the web application, maintaining session-specific chat histories accurately. This functionality relies on properly handling cookies to preserve session IDs across user interactions.

However, when I integrated this web application into Microsoft Teams as a custom app, I noticed a significant issue. Microsoft Teams does not seem to handle the session in the same way as a browser does. For every new input/query, Teams generates a new session, which results in the chatbot losing the chat history and treating each input as an independent session.

This behavior is unexpected since the web app works flawlessly in maintaining session-based chat histories when accessed directly via a browser.

Here are some additional details:

  • The application is built using Flask, with sessions stored on the filesystem .
  • Cookies are being used to maintain session IDs on the web application, and these are functioning as expected when tested locally or in a browser environment.
  • Teams integration is done by embedding the app’s URL into the Teams app configuration.

Query:

  1. Does Microsoft Teams handle cookies or session management differently compared to standard web browsers?
  2. If yes, what is the best way to maintain consistent session management and chat history when the app is running within Microsoft Teams?
  3. Are there any Teams-specific settings or APIs that need to be configured to support persistent session handling for embedded web apps?

I would appreciate any insights or guidance on resolving this issue to ensure that the chatbot retains its session-based chat history within Microsoft Teams.

Thank you in advance for your help!

Best regards,

No RepliesBe the first to reply

Resources