BOT
44 TopicsCSS Properties being stripped from Teams Chat messages from Bot
Hi Team, We've noticed that certain CSS properties are no longer appearing in HTML messages when sent to Teams Chat. Previously, our bot styled messages using display and border properties, but now these properties are missing from the HTML when we inspect the page. Steps to Reproduce: Start the Echo bot from the sample templates (I used Teams Toolkit to deploy it to Teams or run it in the Test tool). In the TeamsBot.ts file, modify the onMessage function by replacing await context.sendActivity(...) with the following code. This example adds styling to an echo message. const a: Partial<Activity> = { text: `<span style="display: block; color: red; border-radius: 4px; padding: 4px; border: 1px solid red; ">Echoo:</span> <span style="display: block;">${txt}</span>`, textFormat: TextFormatTypes.Xml }; await context.sendActivity(a); Note: I also tried sending the HTML directly with context.sendActivity(...) without setting the textFormat property in the Activity, and observed the same result. Run the bot in the Test tool and Teams to compare behavior. Observed behavior: In the Test tool: All styles are applied as expected. In Teams: Only the color property is applied, while display, padding, and border properties are ignored (stripped out of the HTML). Here’s an example of the HTML output in Teams: <div dir="auto" id="content-1730973548675" aria-label="Echoo: test styles properties" class="fui-Primitive ___16zla5h f1oy3dpc fqtknz5 fyvcxda"> <span style="color: red;">Echoo:</span> <span>test styles properties</span> </div> Could you provide insights on whether this change is intended, and if there are any workarounds for preserving these CSS properties in Teams messages? Thank you!291Views11likes1CommentUnfurlink Link (Adaptive card) in
Hello We try to return an adaptive card to the Microsoft Teamsmessage area after pasting a URL in the MS Teams message area as shown here(line 17). The only difference between our code and the code displayed here is that instead of returning a Hero Card we would like to return an adaptive card. Unfortunately for some reason the adaptive card is not displayed in the MS Teams message area after pasting the URL in the message area. Could you share the way how to do it the correct way?1.9KViews2likes2CommentsBot unable to receive start and end meeting events for app published in organization
Hi, We recently integrated Azure Bot into our Teams App to receive meeting start and end events. When we side load this app on Teams we can receive meeting start and end events. When the same app is published to org and added to a meeting then this app cannot receive the meeting start and end events. This is how our current manifest looks { "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.12/MicrosoftTeams.schema.json", "manifestVersion": "1.12", "version": "[MS_TEAMS_APP_BUILD_NUMBER]", "id": "[MS_TEAMS_APP_ID]", "developer": { "name": "[NAME]", "websiteUrl": "[URL]", "privacyUrl": "[PRIVACY_URL]", "termsOfUseUrl": "[TOS_URL]" }, "name": { "short": "[MS_TEAMS_APP_NAME]" }, "description": { "short": "Teams", "full": "[MS_TEAMS_APP_LONG_DESC]" }, "icons": { "color": "color.png", "outline": "outline.png" }, "accentColor": "#FFFFFF", "bots": [ { "botId": "[MS_BOT_ID]", "scopes": ["groupchat"], "isNotificationOnly": false } ], "webApplicationInfo": { "id": "[MS_BOT_ID]", "resource": "https://RscPermission" }, "configurableTabs": [ { "configurationUrl": "[CLIENT_BASE_URL]/config", "scopes": ["groupchat"], "context": [ "meetingSidePanel", "meetingStage", "meetingChatTab", "meetingDetailsTab" ] } ], "authorization": { "permissions": { "resourceSpecific": [ { "type": "Application", "name": "OnlineMeeting.ReadBasic.Chat" }, { "type": "Delegated", "name": "MeetingStage.Write.Chat" } ] } } }2.8KViews1like8CommentsBuilding a customizable app for Teams
Hi, I recently noticed that in the Microsoft Teams Admin Center in the Manage App section, some apps are "customizable". I am creating an app which will send requests to a software that is installed on-premises and thus has different domain name depending on the organisation using it (xxx.com, abc.com…). Could I use this feature to make the domain name customizable by the Teams admin so that the app is ready to use by the Teams users. I also wonder if and how I can use this customized data (I suppose it is manifest data) in my app code (note: I am using NodeJS). Side question, I also noticed a "Settings" tab which is always empty, what is it for, how can I add settings to my app? Thank youSolved1.3KViews1like4Comments