'App resource defined in manifest and iframe origin do not match

I've created an ms teams app, that works fine if i launch it locally, however when i install the appackage in my team and launch the app, it shows me the following error in the console:

App resource defined in manifest and iframe origin do not match.

my app in azure AD has been configured for multitenancy, with a unique id. And i've added webApplicationInfo object in the manifest file: ", "webApplicationInfo": { "id": "bae.....a8", "resource": "https://xxxxx.onmicrosoft.com/ba.....a8" }"

i tried changing the resource object form https from the manifest and azure to api://, it didnt work, i've also added the query "inTeamsSSO=true" to my static tab. Static tab scopes are: "Team"

how do i fix this issue?



Solution 1:[1]

Please verify the contents of webApplicationInfo section:

"webApplicationInfo": {
    "id": "{AAD App client id}",
    "resource": "api://{Your tab app domain}/{AAD App client id}"
  }

Please make sure the domain in webApplicationInfo is same as your tab app's domain, otherwise Teams will return error.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Prasad-MSFT