Share via

Inconsistent runtime behavior observed in deployed Microsoft Teams custom app

Stumpf Mirna 20 Reputation points
2025-12-16T10:12:35.8366667+00:00

My custom app installs successfully, but specific capabilities are unavailable depending on the client. The app works as expected in the Teams desktop client, while in Teams web or mobile, certain features such as task modules or message extensions fail to load or return a generic error.

There are no errors during app upload or installation, and the manifest and Azure AD app registration are identical across environments.

Microsoft Teams | Development
Microsoft Teams | Development

Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs

0 comments No comments

Answer accepted by question author

Steven-N 25,305 Reputation points Microsoft External Staff Moderator
2025-12-16T12:10:44.63+00:00

Hi Stumpf Mirna

Thank you for reaching out to Microsoft Q&A forum

From my perspective, when a custom Teams app works fine on desktop but encounters issues with features like task modules and message extensions on web or mobile, it's typically not a missing feature but rather a client-side rendering or configuration issue. Common problems include content that can't be iframed or isn't listed in validDomains, authentication redirects within an iframe, or incorrect dialog wiring (like missing or misconfigured fetchTask or TaskModuleResponse).

In this context, I think you can read the below suggestion to see if it can resolve or at least mitigate this behavior:

1/ Make content renderable & declare it correctly

Ensure every task‑module URL is iframeable (no blocking X-Frame-Options/CSP), and whitelist it in validDomains. Avoid login redirects inside task modules, prefer Teams SSO/token flows. Add a fallbackUrl so mobile can open in a system browser if WebView fails.

2/ Fix dialog wiring for message extensions / task modules

For action‑based message extensions set fetchTask: true in the manifest and implement handleTeamsMessagingExtensionFetchTask/SubmitAction to return a valid TaskModuleResponse. Cross‑test with Microsoft samples and keep SDK/manifest up to date.

3/ Eliminate client/package issues & capture diagnostics

Kindly try to clear cache and remove conflicting app packages. You can use DevTools on web and the mobile Performance/diagnostics tools to capture console/network errors and pinpoint CSP/auth blocks.


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".     

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

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