Skip to content

When reading the property page...I don't see the data I sent from the adaptive card. #1849

@jos-dev-90

Description

@jos-dev-90

I am using this example to draw a graph in a modal.

I am setting the JSON as follows from my Adative Card

// Adaptive Card for tab to show in stage view const adaptiveCardForTabStageView = (baseUrlForOpenUrl) => ({ $schema: "http://adaptivecards.io/schemas/adaptive-card.json", body: [ { type: "TextBlock", size: "Medium", weight: "Bolder", text: "Click the button to open the url in tab stage view", }, { type: "ActionSet", actions: [ { type: "Action.Submit", title: "View via card", data: { msteams: { type: "invoke", value: { type: "tab/tabInfoAction", tabInfo: { contentUrl: ${process.env.BaseUrl}/content, websiteUrl: ${process.env.BaseUrl}/content`,
name: "Stage view",

              // here is the json
              **entityId: "stageViewTask",
              subEntityId: JSON.stringify({
                type: "chart",
                id: "123",
                theme: "dark",
              })**,


            },
          },
        },
      },
    },
    {
      type: "Action.OpenUrl",
      title: "View via Deep Link",
      url:
        "https://teams.microsoft.com/l/stage/" +
        process.env.TeamsAppId +
        "/0?context=%7B%22contentUrl%22%3A%22https%3A%2F%2F" +
        baseUrlForOpenUrl +
        "%2Fcontent%22%2C%22websiteUrl%22%3A%22https%3A%2F%2F" +
        baseUrlForOpenUrl +
        "%2Fcontent%22%2C%22name%22%3A%22DemoStageView%22%7D",
    },
  ],
},

],
type: "AdaptiveCard",
version: "1.4",
});

module.exports = {
adaptiveCardForTabStageView,
};
`

  1. Click on View via card
Image
  1. I cannot see the data stored on the adaptive card.{
    type: "chart",
    id: "123",
    theme: "dark",
    }
Image

Manifest.json
{ "$schema": "https://developer.microsoft.com/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", "manifestVersion": "1.16", "version": "1.0.0", "id": "bee2c02e-7c15-46c5-8495-57c0a130b2ad", "packageName": "com.microsoft.teams.tabstageview", "developer": { "name": "Microsoft", "websiteUrl": "https://www.microsoft.com", "privacyUrl": "https://www.microsoft.com/privacy", "termsOfUseUrl": "https://www.microsoft.com/termsofuse" }, "name": { "short": "Tab Stage View", "full": "Tab in stage view" }, "description": { "short": "Microsoft Teams tab sample app showcasing stage view functionality.", "full": "This sample app demonstrates the use of Teams tab in stage view using Node.js, featuring collaborative elements and interactive capabilities." }, "icons": { "outline": "outline.png", "color": "color.png" }, "staticTabs": [ { "entityId": "stageViewTask", "scopes": [ "personal" ], "context": [ "personalTab", "channelTab" ], "name": "Stage View", "contentUrl": "https://9d750ecc47ad.ngrok-free.app/tab", "websiteUrl": "https://9d750ecc47ad.ngrok-free.app/tab", "searchUrl": "https://9d750ecc47ad.ngrok-free.app/tab" } ], "bots": [ { "botId": "bee2c02e-7c15-46c5-8495-57c0a130b2ad", "scopes": [ "team", "personal", "groupchat" ], "isNotificationOnly": false } ], "accentColor": "#60A18E", "composeExtensions": [ { "botId": "bee2c02e-7c15-46c5-8495-57c0a130b2ad", "commands": [ { "id": "searchQuery", "context": [ "commandBox" ], "description": "Test command to run query", "title": "Search Command", "type": "query", "parameters": [ { "name": "searchQuery", "title": "Search Query", "description": "Your search query", "inputType": "text" } ] } ], "messageHandlers": [ { "type": "link", "value": { "domains": [ "tabstageview.com/card", "9d750ecc47ad.ngrok-free.app" ] } } ] } ], "permissions": [ "identity", "messageTeamMembers" ], "validDomains": [ "9d750ecc47ad.ngrok-free.app", "token.botframework.com" ] }

content-tab.html
`

<script src="https://res.cdn.office.net/teams-js/2.34.0/js/MicrosoftTeams.min.js" integrity="sha384-brW9AazbKR2dYw2DucGgWCCcmrm2oBFV4HQidyuyZRI/TnAkmOOnTARSTdps3Hwt" crossorigin="anonymous"></script>

Tab in Stage View

Learn about building Web apps with ASP.NET Core.

Close Stage View
<script> async function initializeTeamsApp() { try { // 1. init SDK await microsoftTeams.app.initialize(); console.log("SDK initialized successfully."); // 2. Get context (getContext it is also a promise in v2) const context = await microsoftTeams.app.getContext(); console.log("Context obtained:", context); // 3. otify Teams that the app is ready to be displayed microsoftTeams.app.notifySuccess(); // The subEntityId contains your JSON. if (context.page.subEntityId) { const config = JSON.parse(context.page.subEntityId); console.log("Configuration received:", config); // Paint graphic with config.id } } catch (error) { console.error("Error initializing the Teams SDK", error); } finally { console.log("Initialization attempt completed."); } } // Execute the function initializeTeamsApp(); function closeStageView() { microsoftTeams.stageView.self.close().then(() => { console.log("Closed stage view."); }).catch((error) => { console.error("Error closing:", error); }); } </script> `

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions