Modifying Teams custom app ValidDomains list dynamically

Apollo services 1 Reputation point
2021-09-20T10:08:34.93+00:00

Hi,

We are building a personal tab to render our web application inside Teams. Our web application serves customers from different domains.
So, We have to add all the domains manually under the validDomains list to support all the customers.

And every time, if we add a new customer, we would have to add their domain to the validDomains list and submit the Teams App. Since this process is repeating and time-consuming, is there any workaround to solve it, without submitting the Teams App multiple times?

Microsoft Teams | Development
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Prasad-MSFT 9,331 Reputation points Microsoft External Staff Moderator
    2021-09-21T12:53:48.177+00:00

    There is no way to dynamically set validDomains list in app manifest. However you can update the app with new manifest in app catalog section in Teams, so that you don't have to submit it multiple times.
    133973-ss1.png

    Thanks,
    Prasad Das


    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link.

    1 person found this answer helpful.

  2. Avo Sarafian 0 Reputation points
    2025-08-08T07:57:39.5133333+00:00

    It's 2025, and there seems to be no out of the box solution or an online documentation advising how to manage multi-tenant applications just like the OP's scenario. I know a lot of time has passed, but I wanted to registerd on here just to provide a solution for future devs in the same situation.

    Our custom application (tab on an existing bot app) required users to login to their own platform. this required SSO, and SSO is usually blocked due to CORS when navigating within the iFrame that the tab renders.

    To go about this, we launch a popup microsoftTeams.authentication.authenticate where the targetURL was on a domain that's found under the ValidDomains (same as the tab's url). this targetURL was a redirect page that passed all necessary parameters to the actual page we wanted (since the actual destination was not part of the ValidDomains, so notifySuccess() wouldn't have worked after a login). Then, once the SSO login was complete, the page sends the data encrypted to a "finish.html" script that called the notifySuccess or notifyFailure callback back to microsoftTeams.authentication.authenticate.

    So, in our case, we went around the validDomains manifest submission for over 500+ domains.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.