Redirect across domains in a Microsoft Teams tab


The navigateCrossDomain API has been deprecated and will not work in future versions of the SDK. References to it have been removed from this article.

You may need to redirect the configuration or content page to a location on a different domain or subdomain. For example, suppose your configuration page begins on However, after a user who works for the Contoso Company signs in, your app needs to redirect to (or perhaps even a different domain altogether, like

There are several ways to do this using JavaScript:

  • window.location.href="";
  • window.location.assign("");
  • window.location.replace("");

If you don't want the navigation to appear in browser history, use window.location.replace.

Ensure that the URL is included in the validDomains list in your manifest. For more information, see validDomains in the manifest schema reference.