Forum Discussion
Yannie
Jan 18, 2022Tin Contributor
MS Teams Application HTTP Context Session Changed when Postback
I have a MS Teams App that contains tab for opening SharePoint Add-ins (Provider-hosted) pages. When using MS Teams Desktop and web, the session always changes when Postback and failed to get ShareP...
Meghana-MSFT
Jan 19, 2022Former Employee
Yannie - Could you please share more details on this issue? Also please share sample and repro steps, so that we can check it locally.
- YannieJan 19, 2022Tin Contributor
We have a Provider-hosted SharePoint Add-in with several pages.
We put them on a MS Teams App as a tab by using App Studio.
The pages works well at first on MS Teams Desktop but recently users report that the issue persist while using Teams Desktop.
After adding some debugging logs to the add-in, we found that the page session is null after postback and result in the application failed to get the SharePoint Context only when using MS Teams web and Desktop.To replicate,
create a provider-hosted add-in and install to a SharePoint site
create a blank page with a button that will trigger postback in the add-in.
create the Teams app using App Studio and add the page as Tab.
Test and install the app
Open the tab and click the button using MS Teams web
- YannieJan 19, 2022Tin Contributor
- Meghana-MSFTJan 20, 2022Former EmployeeThank you for providing the repro steps. We are checking this locally. We will get back to you.