Teams Uncategorized

Detect if your website is loaded from Teams

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;
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: