sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Messaging Extension not rendering SPFX webpart

Open NicolasMCAG opened this issue 6 years ago • 6 comments

Hi!

After following the steps to render a SPFX webpart in a messaging extension I get a blank task module.

image

image

Steps I performed:

  1. Generated a SPFX 1.10 solution, just the basic Hello World from the generator.
  2. In the package: includeClientSideAssets in true and skipFeatureDeployment in true.
  3. In the webpart manifest: supportedHosts => SharePointWebpart, TeamsTab, TeamsPersonalApp
  4. Build/bundle/package solution with ship flag.
  5. Uploaded to App Catalog, marked to deploy to all sites, and sync to Teams.
  6. Generated an app manifest with the following compose extension (trimmed for brevity) and sideloaded to Teams:

edited by @andrewconnell ... in the future, please use the markdown code fencing pattern... impossible to read JSON in one line

"composeExtensions": [
    {
      "botId": "9fa9af77-11d5-4cfd-986d-658c41fcb195",
      "canUpdateConfiguration": false,
      "commands": [
        {
          "id": "TestID",
          "title": "Test Title",
          "description": "Test Description",
          "initialRun": false,
          "type": "action",
          "context": [ "message", "compose" ],
          "fetchTask": false,
          "taskInfo": {
            "title": "Fill in the fields",
            "width": "large",
            "height": "large",
            "url": "https://{teamSiteDomain}{teamSitePath}/_layouts/15/TeamsLogon.aspx?SPFX=true&dest={teamSitePath}/_layouts/15/teamstaskhostedapp.aspx%3Fteams%26personal%26componentId=68a6425b-df85-4bea-8bf0-9953c1f09f92%26forceLocale={locale}"
          }
        }
      ]
    }
  ],
"validDomains": [
    "*.login.microsoftonline.com",
    "*.sharepoint.com",
    "*.sharepoint-df.com",
    "spoppe-a.akamaihd.net",
    "spoprod-a.akamaihd.net",
    "resourceseng.blob.core.windows.net",
    "msft.spoppe.com"
  ]

Tests I performed:

  • Added the webpart to a page in SharePoint: worked.
  • Added the webpart to a Teams tab: worked.
  • Invoked the compose extension from compose box: didn't worked -- issue described at the top.
  • Invoked the compose extension from the message actions: didn't worked -- issue described at the top.

Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

NicolasMCAG avatar Jul 08 '20 10:07 NicolasMCAG

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

msft-github-bot avatar Jul 08 '20 10:07 msft-github-bot

MS Teams messaging extensions aren't supported with SPFx at this time... I think they may be coming in SPFx v1.11, but they aren't supported in v1.10 at this time.

andrewconnell avatar Jul 13 '20 15:07 andrewconnell

Hi @andrewconnell,

This link says they do.... https://docs.microsoft.com/en-us/sharepoint/dev/spfx/build-for-teams-expose-webparts-teams

That's also the same link I created the issue for, can you clarify this, please?

Thank you.

NicolasMCAG avatar Jul 14 '20 06:07 NicolasMCAG

The link also says it's supported in SPFx v1.11 apps, which has yet to be released.

andrewconnell avatar Jul 14 '20 15:07 andrewconnell

Perfect!!! Thank you very much, @andrewconnell

NicolasMCAG avatar Jul 15 '20 06:07 NicolasMCAG

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jul 22 '20 12:07 msft-github-bot