developer
1374 TopicsBot configuration config/fetch returns same channel ID when switching channels within same team
Summary When invoking a bot’s configuration flow (configuration.fetchTask) via an @mention-based settings entry point across different channels within the same Team, the request body consistently contains the same channelId, even after switching channels. https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/bot-configuration-experience?tabs=teams-bot-sdk1%2Cteams-bot-sdk2%2Cteams-bot-sdk3 This makes it impossible to reliably determine which channel initiated the configuration. Environment Microsoft Teams (desktop client) Bot installed at team scope Same Team, multiple channels Bot supports team scopes. Configuration enabled via manifest: "configuration": { "team": { "fetchTask": true } } Steps to Reproduce Install the bot into a Team with multiple channels Navigate to Channel A Invoke the bot configuration using an @Bot settings / configuration entry point Observe the incoming config/fetch request payload Note the channelId in the request body Switch to Channel B (same Team) Invoke the same configuration entry point again Observe the incoming config/fetch request payload Expected Behavior The config/fetch request body should include a channel identifier corresponding to the channel where the configuration was initiated, e.g.: channelData.channel.id or another channel-scoped identifier that uniquely identifies the initiating channel Actual Behavior The config/fetch request body always contains the same channel ID The channel ID does not change when switching channels The value appears to be: either the Team’s General channel or a cached / team-level channel context As a result, the bot cannot determine which channel the user intended to configure. Impact This behavior prevents implementing per-channel configuration using the bot configuration experience because: Configuration requests cannot be reliably scoped to the initiating channel All configuration actions appear to target the same channel Users configuring different channels in the same Team unintentionally overwrite the same settings Additional Notes This occurs within the same Team Reproduced consistently across multiple channels Observed even when the configuration is invoked after explicitly switching channels Behavior suggests the configuration context may be team-scoped rather than channel-scoped, but this is not clearly documented16Views0likes0CommentsSet work location via API (Graph?)
Hey community! The new work hours and location feature is rolling out for Outlook and Teams: https://blog.admindroid.com/work-hours-and-location-in-outlook-for-efficient-collaboration/ Does anyone know who to read and write this information (especially the location) via API / Microsoft Graph? This is a nice feature and we would like to set this programmatically. Thank you very much! Best regards, Jens14KViews1like18CommentsTask 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 -54Views0likes1CommentApp 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!171Views0likes4CommentsPowershell 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_12Solved145Views0likes4CommentsUsers 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.103Views0likes2CommentsIssue 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 Azeet134Views0likes2Comments