Skip to content

dialog.url.submit() does not close Teams dialog #81

Description

@Ashlesha-MSFT

I’m using the Microsoft Teams JS SDK to open a dialog and submit data back to the parent tab.

Inside the dialog I have:

import { dialog } from "@microsoft/teams-js";

async function submit() {
  await dialog.url.submit({
    result: {
      name: "test"
    }
  });
}

The submit() call completes without throwing an exception, but the dialog remains open and the parent tab does not receive the expected result.

What is the correct way to submit a result from a Teams dialog using the current Teams JS SDK? Does the parent need to register a callback before opening the dialog, or is there another required configuration?

SDK version: @microsoft/teams-js 2.x
Host: Microsoft Teams desktop

Activity

  1. atktroubleshootingapp commented on Sep 29, 2026

    @atktroubleshootingapp

    👋 Hi @Ashlesha-MSFT,

    Thank you for reporting this issue. Here is an AI-generated initial response:

    Classification: Not a bug — the shown call omits the app ID required when submitting a result; the parent must also supply a submit handler when opening the dialog.

    • Teams’ dialog guidance says to pass the opening app’s manifest ID as the second argument when returning an object. submit() takes the result directly, so { result: { name: "test" } } adds an unnecessary wrapper.
    • dialog.url.submit() returns void; awaiting it does not confirm that Teams closed the dialog.

    What to do now:

    1. In the parent tab, initialize TeamsJS, then call dialog.url.open(urlDialogInfo, ({ err, result }) => { /* handle result */ }).
    2. In the dialog page, initialize TeamsJS, then call dialog.url.submit({ name: "test" }, manifestAppId). Confirm the URL is in the manifest’s validDomains.
    3. If it still stays open, provide the exact TeamsJS 2.x version, parent opening code, manifest settings, and a minimal reproduction.

    Useful links:


    Note: AI-generated guidance may be incomplete or incorrect. Please verify suggestions before applying them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI-generated responseAn AI-generated response has been posted to this issue.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions