if you have a website that you want to loaded in Microsoft Teams, you might want to customize the layout. The amount of real estate to work with is a bit less or you just want to make sure the website integrates nicely with Teams.
You can use a very easy JavaScript function to detect if Teams is used. You can look in the User Agent and see if Teams is a part of it.
function isLoadedFromTeams () {
if( navigator.userAgent.match(/Teams)) {
return true;
}
return false;
}