The teamslogon.aspx does not seem to be working properly when used in Teams Chat Tabs.
My understanding is that teamslogon.aspx is supposed to take care of the authentication when redirecting to SharePoint content in Teams.
While this works fine for Channel Tabs it does not work for Chat Tabs (of type Website).
For example, a Chat Tab with the content url :
https://contoso.sharepoint.com/sites/ContosoNet/_layouts/15/teamslogon.aspx?SPFX=true&dest=/sites/ContosoNet/Home%20page.aspx
Will return a 200 (OK) and show a loading forever.
Whereas the same url in a Channel Tab would redirect to :
https://contoso.sharepoint.com/sites/ContosoNet/Home%20page.aspx
with the proper cookies to access SharePoint content.
Is there any way for a Chat Tab to show content from SharePoint in Teams (both in app and in browser) while not already having Sharepoint cookies in the browser?
Edit : You can reproduce the teamslogon.aspx not working by creating a Website Chat Tab with the Graph API using this query :
POST https://graph.microsoft.com/v1.0/chats/{chat-id}/tabs
Content-Type: application/json
{
"displayName": "My Test Tab",
"configuration": {
"contentUrl": "https://contoso.sharepoint.com/sites/ContosoNet/_layouts/15/teamslogon.aspx?spfx=true&dest=https://contoso.sharepoint.com/sites/ContosoNet/MyLibrary/MyPage.aspx",
"websiteUrl": "https://contoso.sharepoint.com/sites/ContosoNet/MyLibrary/MyPage.aspx",
"wikiDefaultTab": false
},
"teamsApp@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/com.microsoft.teamspace.tab.web"
}
You would need to replace {chat-id} with a valid chat id hosted on your tenant. And also update the websiteUrl and contentUrl to valid paths on your tenant.
While the tab will be created using this query, it will show a loading forever when accessed without already having SharePoint cookies.