Share via

Invoke activity succeeds but Task Module response not rendered

Tiziano Boubou 20 Reputation points
2026-04-18T03:57:03.8333333+00:00

We are seeing a regression in a custom app for Microsoft Teams where installation succeeds but tab and bot initialization intermittently fail post-deployment; tabs return a generic load error or remain blank, and bot messages do not trigger responses, despite endpoints being reachable (HTTP 200) and no changes to the app manifest, hosting, or Bot Framework SDK implementation; the issue reproduces across desktop and web clients, persists after cache clear and reinstall, and affects multiple users, suggesting a potential change in Teams client validation, CSP/domain enforcement, or app manifest handling

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
2026-04-18T06:01:04.1266667+00:00

Hi Tiziano Boubou

In this situation, if the app installs but the tab intermittently shows a blank/generic load error across clients, it commonly indicates the Teams host is blocking or timing out the embedded tab at runtime due to iframe security requirements (CSP frame-ancestors / framing headers).

Given this, the suggestions below might help:

  1. Verify your tab’s response headers allow embedding from Teams/M365 hosts by setting CSP frame-ancestors correctly (including https://*.cloud.microsoft per Microsoft’s host migration guidance) and ensuring framing headers don’t block iframes.
  2. Confirm every hostname used at runtime (all redirects, auth pages, CDNs, subdomains) is included in the manifest validDomains, because Teams may block the tab if it lands on an undeclared domain.
  3. Eliminate init-timeout patterns by reviewing any loading/ready signaling behavior. For example, scenarios where Teams waits for readiness and can time out, producing a “problem reaching this app” style error).
  4. Harden Teams SDK init by calling app.initialize() once, awaiting it, and gating all other SDK calls behind it to avoid intermittent “not initialized” behavior.

You can read here for more information:
https://techcommunity.microsoft.com/discussions/teamsdeveloper/custom-app-is-not-loading/3658589

https://github.com/OfficeDev/microsoft-teams-library-js/issues/2780

In case the problem still persists, kindly let me know in the comment section

Best regards


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?


1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-04-18T03:57:21.8066667+00:00

    Based on the symptoms (intermittent blank tabs / generic load error, bot not responding despite HTTP 200, no manifest or hosting changes, multiple users and clients affected), the most likely causes are:

    1. Teams client failing tab load due to iframe or domain/manifest issues
    2. Manifest or package validation/parse issues introduced by a recent Teams client change
    3. Bot invoke/response pipeline not returning the exact structure Teams expects (especially for dialogs/task modules)

    Use the following checks and mitigations.

    1. Validate the app package and manifest
    2. Run the package through the Teams app validator:
      • Go to the Teams app validator and upload the .zip.
      • Fix any Manifest parsing has failed or related errors, including warnings about validDomains, scopes, or capabilities.
    3. Re‑upload the app in Teams:
      • If updating an existing app, use Replace instead of Upload to avoid ID conflicts.
      • Ensure manifest.json is at the top level of the .zip, encoded as UTF‑8, and valid JSON.
    4. If manifest updates don’t appear, sign out of Teams and sign back in to clear cache.

    Relevant guidance: manifest read/packaging issues and upload errors are documented under Issues with packaging and uploading.

    1. Diagnose blank tabs and tab initialization failures
    2. Check iframe and domain configuration:
      • Ensure the tab content can be displayed in an <iframe>.
      • Confirm the tab’s content URL domain is listed in validDomains in the manifest. If the domain changed (including subdomains or protocol), update validDomains and re‑package.
    3. Check for login redirects:
      • A blank tab appears if the tab URL redirects to a login page, which won’t render in an iframe. If authentication logic recently changed (even upstream, e.g., IdP or CSP), ensure it does not rely on redirecting the main tab URL to a login page.
    4. Inspect with Dev Tools in the Teams client:
      • Open Dev Tools in Teams and use the Network and Console tabs while loading the tab.
      • Look for blocked iframe loads, CSP violations, or 3xx redirects to auth endpoints.
    5. Review caching behavior:
      • If the web app was updated, verify server cache headers (Cache-Control) so that stale content or scripts are not being served to Teams.

    These scenarios and mitigations are covered under To troubleshoot tabs.

    1. Diagnose bot and invoke failures (including dialogs/task modules)
    2. Use Teams web + Developer tools:
      • Open the Teams web client, sign in, run the bot or message extension.
      • Open Developer tools → Network, filter by invoke.
      • Select failing requests and inspect the Response tab.
      • Look for the standardizedError object (errorCode, errorSubCode, errorDescription) to understand whether the issue is validation, auth, or payload shape.
    3. Check HTTP status codes:
      • 400: likely malformed or missing parameters in the bot’s response payload.
      • 401/403: auth issues (token, app ID/secret, or tenant alignment) even if the endpoint returns 200 for health checks.
      • 500: server‑side error in the bot or downstream service.
    4. Verify dialog/task module response structure:
      • For dialogs (task modules) invoked from tabs or bots, ensure the invoke handler returns the exact structure Teams expects.
      • The invoke pipeline must:
        • Return a JSON response containing the dialog payload for the invoke.
        • Return an InvokeResponse with the correct body shape (e.g., task object with type, value, and card or URL) and appropriate status code.
      • Mis‑shaped invoke responses can cause the client to show generic errors like “Unable to reach app. Please try again.” even when the endpoint returns 200.
    5. If using the newer CloudAdapter / M365 Agent SDK patterns:
      • Ensure the adapter is initialized correctly for the tenant(s) in use.
      • Ensure the invoke routing and handlers are wired so that invoke activities return InvokeResponse objects, not plain message activities.

    The Q&A examples in the context show that:

    • Incorrect adapter initialization for cross‑tenant or new SDKs can cause Unauthorized errors on send.
    • Incorrect invoke response handling in the M365 Agent SDK for Python prevented task modules from rendering until the pipeline was wired to return the correct InvokeResponse payload.
    1. Check for broken app functionality and validation regressions

    Even if the app previously passed validation, new Teams client or marketplace validation rules can surface as runtime failures if the app:

    • Has broken workflows (dead ends, crashes, continuous loading, unexpected errors).
    • Redirects users away from Teams without proper disclaimers.
    • Provides a suboptimal or inconsistent experience across desktop, web, and mobile.

    Re‑test all end‑to‑end workflows across clients and fix any broken flows. If the app is extended to Outlook or Microsoft 365, ensure it provides value and does not break there, as validation failures in those surfaces can affect deployment.

    1. When to escalate

    If:

    • The manifest validates successfully,
    • Domains and iframe behavior are correct,
    • Invoke responses and bot adapter configuration are correct,
    • Network traces show valid responses but the client still intermittently fails across users and clients,

    then capture:

    • App ID, tenant, and correlation IDs from failing requests,
    • Network trace (including invoke responses and any 4xx/5xx),
    • Screenshots of the generic errors,

    and open a case with Microsoft Teams product support for deeper investigation.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer 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.