MS Teams Application HTTP Context Session Changed when Postback and failed to get SPContext

Yannie Pang 1 Reputation point
2022-01-20T10:46:05.183+00:00

HI all,
I have a MS Teams App that contains tab for opening SharePoint Add-ins (Provider-hosted, asp.net webforms) pages.

When using MS Teams Desktop and web, the session always changes when Postback and failed to get SharePoint Context.

166803-image.png
After clicking the button for Postback

166707-image.png
This only happens in using MS Teams Desktop and Web for some users.

To replicate,

  1. simply create a asp.net webform SharePoint Add in for SharePoint Online
  2. in the default page add a asp:button to the page
  3. deploy and add the app to SharePoint Online
  4. Create a app using App Studio in MS Teams
  5. add the default page as a tab in the app
  6. open the app in MS Teams Web
  7. click the button
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,597 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,835 questions
{count} votes