developer
1373 TopicsTask Module shows popup but Adaptive Card does not render using M365 Agent SDK (Python)
I am using the new M365 Agent SDK for Python to return a Task Module (task/fetch). The popup opens successfully when I click the button in Teams, but the Adaptive Card inside the Task Module does not render. Instead, Teams shows the generic error: “Unable to reach app. Please try again.” My invoke handler returns the following structure: adaptive_card = { "type": "AdaptiveCard", "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.4", "body": [ {"type": "TextBlock", "text": "Sample task module card"}, {"type": "Input.Text", "id": "notes", "isMultiline": True} ], "actions": [ { "type": "Action.Submit", "title": "Submit", "data": {"action": "sample_task_submit"} } ] } task_response = { "task": { "type": "continue", "value": { "title": "Dialog", "width": "medium", "height": "medium", "card": { "contentType": "application/vnd.microsoft.card.adaptive", "content": adaptive_card } } } } return InvokeResponse(status=200, body=task_response) Key symptoms: Task module window opens (so invoke is successful) Adaptive card does not render Shows “Unable to reach app” inside popup No errors in server logs This happens only with Task Modules; normal message replies work fine Questions: Is the above Task Module response format correct for the new M365 Agent SDK for Python? Does the SDK require a different return type or content-type for invoke responses? Are Task Modules fully supported in the M365 Agent SDK preview? Is there an example of returning a Task Module using the Python SDK? Any clarification or working sample for Python would be very helpful. Screen shot -21Views0likes0CommentsApp Validation Issue - Bot must send a proactive welcome message in personal scope
I'm working on a bot application for MS Teams using the Python SDK and encountered a challenge with app validation and the proactive welcome message requirement. What Happened: Initially, our bot handled the welcome message through on_installation_update, but app validation failed with the error: "Bot must send a proactive welcome message in personal scope." To satisfy validation, we added on_members_added_activity to send the welcome message for personal scope, which resolved the validation error. However, this created a new problem: on_members_added_activity is being triggered when we call the Graph API to query chats or users: {graph_url}/me/chats $filter=chatType eq 'oneOnOne' and installedApps/any(a:a/teamsApp/id eq '{teams_app_id}') {graph_url}/users/{user_id}/chats $filter=chatType eq 'oneOnOne' and installedApps/any(a:a/teamsApp/id eq '{teams_app_id}') According to a Stack Overflow discussion (https://stackoverflow.com/questions/57496329/proactive-messaging-bot-in-teams-without-mentioning-the-bot-beforehand), this appears to be a known issue: calling this API triggers a conversation update event even though there were no actual updates, resulting in duplicate events and duplicate welcome messages. Questions: What is the official/recommended way to handle known issue: calling this API triggers a conversation update event? Whats the recommended way to read personal chat history of a user? Should we be using a different approach for this app validation requirement? Any guidance or pointers to official documentation would be greatly appreciated!157Views0likes4CommentsPowershell adding a existing holiday to Auto Attendant
Hello I have to add an existing Holiday to Auto Attendant and have this script # Connect to Microsoft Teams # Connect-MicrosoftTeams # Variables - Replace with your actual values $autoAttendantName = "AA_Test" $holidaySetName = "Holiday" #$audioFilePath = "Paht\test.wav" # Path to your audio file # 1. Upload Audio File as Prompt $content = [System.IO.File]::ReadAllBytes('Path\test.wav') $audioFile = Import-CsOnlineAudioFile -ApplicationId "OrgAutoAttendant" -FileName "test.wav" -Content $content $audioPrompt = New-CsAutoAttendantPrompt -AudioFilePrompt $audioFile # 2. Create Holiday Call Flow with Disconnect Option $holidayCallFlow = New-CsAutoAttendantCallFlow -Name "Holiday Call Flow" ` -Greetings @($audioPrompt) ` -MenuOptions @( New-CsAutoAttendantMenuOption -Action Disconnect -DtmfResponse Automatic ) # 3. Get existing Auto Attendant and Holiday Set $aa = Get-CsAutoAttendant -Namefilter $autoAttendantName $holidaySet = Get-CsAutoAttendantHolidaySet -Name $holidaySetName # 4. Link Holiday Set and Call Flow to Auto Attendant Set-CsAutoAttendant -Identity $aa.Identity ` -HolidaySets @($holidaySet.Identity) ` -HolidayCallFlow $holidayCallFlow.Identity # 5. Verify Get-CsAutoAttendant -Identity $autoAttendantName | Select-Object Name, HolidaySets, HolidayCallFlow I do get following error Microsoft.Teams.ConfigAPI.Cmdlets.internal\Import-CsOnlineAudioFile : Expected '{' or '['. Was String: Exception. At C:\Program Files\WindowsPowerShell\Modules\MicrosoftTeams\7.5.0\custom\Merged_custom_PsExt.ps1:7245 char:13 + $internalOutput = Microsoft.Teams.ConfigAPI.Cmdlets.inter ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Import-CsOnlineAudioFile_ImportExpanded], ParserException + FullyQualifiedErrorId : Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Cmdlets.ImportCsOnlineAudioFile_ImportExpanded Where is the mistake Thanks and have a great day JFM_12Solved136Views0likes4CommentsUsers on iOS can't write to group chat with a bot
Hi all, I'm seeing some strange behaviour with the Teams iOS app when trying to interact with bots in 1-1 group chats . I've tried with multiple iPhones, all updated to the latest Teams version. The same issue does not appear on Android and Web/Desktop flavours of Teams. Has anyone seen this issue before? I couldn't find anything in the knowledge base Setup: A group chat with two participants: one bot, one user Behaviour on web/desktop: User sees both participants of the group chat, user can send messages in the group chat Behaviour on Android: User can send messages in the group chat Behaviour on iOS (last tested with 6.13.1): User does not see the bot in the participants of the group chat: User cannot send messages in the group chat: (also notice the bot, which is correctly named "Symlabs9 - Symphony" in the messages on web/desktop, is shown as "Unknown User" on iOS) it seems Teams iOS is not counting the bot as a user? which would explain why the bot doesn't appear in the member list, and why the error about needing more than one person in the room is shown?1KViews5likes10Comments❓ Can't remove member from Microsoft Teams Group Chat using Graph API with Application Permission
Hi everyone, I’m currently working on creating a Teams group chat using Microsoft Graph API with application permissions, and I’ve run into several issues that I hope someone here can help clarify. Creating group chat with members and installed app (works) I followed the documentation here: “Create a one-on-one chat with installed apps” ➜ https://learn.microsoft.com/en-us/graph/api/chat-post?view=graph-rest-1.0&tabs=http#example-3-create-a-one-on-one-chat-with-installed-apps Using application permissions, I successfully: - Created a group chat - Added multiple members - Installed my Teams app into the chat automatically My application has already been granted the following permissions: ChatMember.ReadWrite.All ChatMember.ReadWrite.WhereInstalled The purpose is to allow the app to add or remove chat members without requiring a signed-in user, since I am using fully non-delegated application permissions. However, when I try to remove a member from the group chat using Graph API with the application token, the request fails and returns an error. Trying RSC-granted approach – app not installed Next, I tried creating a group chat using the RSC-granted app approach: https://learn.microsoft.com/en-us/graph/api/chat-post?view=graph-rest-1.0&tabs=http#example-4-create-a-one-on-one-chat-with-rsc-granted-apps With the following permission: - ChatMember.ReadWrite.All And permission type: application The group chat is created successfully, but the app is not installed inside the chat, which means I still can’t proceed with removing a member using the app context. So this solution also stops midway. Creating chat first, then installing the app (also fails) Lastly, I attempted another method: Create the group chat normally After creation, install the app into it using this endpoint: https://learn.microsoft.com/en-us/graph/api/chat-post-installedapps?view=graph-rest-1.0&tabs=http I used an application access token again, but the request returns the same error as case #1 when attempting to remove a member.97Views0likes2CommentsIssue with Teams Tab App
Hi, We are developing a teams tab app which works fine most of the time but intermittently we are seeing below error and if we just click retry it loads fine.Any tips on how to troubleshoot this issue. the app is hosted on aks and we dont see any issues with the availability of the app. Thanks Azeet132Views0likes2CommentsAdaptive Card embedded audio doesn't play
Hi Everyone I have an adaptive card that was working until this week. I've got a workflow that sends an email when a voicemail is received, then saves the voicemail in SharePoint and sends the audio file embedded in an adaptive card in Teams. The code isn't complicated, I've just put the sharing link as a variable and then it's more or less like this: "type": "Media", "sources": [ { "mimeType": "audio/wav", "url": "@{variables('VoicemailLink')})" } ] It was working last week, and I didn't change anything. I've put a quick workaround in to put a hyperlink to the voicemail in the text of the adaptive card, and that seems fine so the variable link is working and the saved audio file is working, it's just not embedding the file nicely into the card. It opens up in a browser window instead. Has there been an update to adaptive cards or Teams that might break this sort of thing? Thanks for your help.170Views0likes3CommentsWhat if post adaptive card and wait for a response timeout
Hi Team, Scenario: Post the adaptive card to the team chat. If the user doesn't respond after 2 hours, the adaptive card should be updated as "Expired"with a new design on the same conversation. In an attempt to comply with this, I used a "Post adaptive card in char and wait for response." Challenges: What would happen if I posted an adaptable card and waited for a response timeout? I wouldn't get a response. An error is being thrown. Expectations include waiting for a response after receiving an adapted card. In any case, your card has already produced a message ID and posted. This action should to return a Message Id in the event that a timeout occurs. Would you kindly respond if you have discovered a solution?2.9KViews3likes12Comments