Forum Widgets
Latest Discussions
Unable to Add Tabs to Chats Consistently in Teams via GraphAPI
Expected Behavior: Tabs should be consistently added to chats when using the Graph API, provided all necessary permissions and conditions are met.Description We are encountering an issue when using the Microsoft Graph API to create chats and install apps and tabs in Microsoft Teams. While we have the necessary permissions, the process of adding a tab to a chat works intermittently. Sometimes the tab is successfully added, but most of the time it fails, even though the app is installed correctly, with the following error: Failed to execute MsGraph backend request GetUserLicenseDetailsS2SRequest. Workload MsGraph_DirectoryServices. Request Url: https://graph.microsoft.com/v1.0/users/c0cfdd6b-d64d-42e1-8111-0881725f68ff/licenseDetails?$select=skuId,skuPartNumber,servicePlans, Request Method: GET, Response Status Code: NotFound, Response Headers: Strict-Transport-Security: max-age=31536000\r\nrequest-id: c86b5fbd-4224-486b-8f3e-8ad3f561a377\r\nclient-request-id: c86b5fbd-4224-486b-8f3e-8ad3f561a377\r\nx-ms-ags-diagnostic: {\"ServerInfo\":{\"DataCenter\":\"North Europe\",\"Slice\":\"E\",\"Ring\":\"4\",\"ScaleUnit\":\"011\",\"RoleInstance\":\"DB1PEPF00075073\"}}\r\nx-ms-resource-unit: 1\r\nDate: Tue, 22 Apr 2025 09:47:03 GMT\r\n, Reason Phrase: Not Found, Request ID 1F9FFBD00A5F489E9B7CABDCFB857858. Reproduction steps: Create an AAD App registration with required application permissions (to install apps and manage tabs in chats), ie at least the following: TeamsAppInstallation.ReadWriteAndConsentForChat.All TeamsTab.ReadWriteForChat.All Create a Teams application with a static tab with "groupChat" scope Install app in chat: POST https://graph.microsoft.com/v1.0/chats/:chatId/installedApps with body below Add (pin) tab to chat: POST https://graph.microsoft.com/v1.0/chats/:chatId/tabs with body below {"email address removed for privacy reasons" : "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/{{AppId}}"} Expected Behavior: Tabs should be consistently added to chats when using the Graph API, provided all necessary permissions and conditions are met. Current Behavior: The process of adding tabs to chats is unreliable. Sometimes the tab is added, but most times, the request fails without clear reasoning. All required permissions appear to be in place since it works occasionally. Note that this issue started to occur at the beginning of the month, around the 8th of April apparently, has anything changed around this date? Also note I also found traces of this issue in our logs but it is apparently resolved now.CedricZimmermannApr 29, 2025Brass Contributor136Views2likes5CommentsCustom announcement for teams compliance recording bot
Hello, I’m trying to add custom announcement to compliance recording bot. I tried first using powershell commands : New-CsCustomPrompt New-CsCustomPromptPackage Set-CsTeamsComplianceRecordingPolicy -CustomPromptEnabled $True -CustomPromptsPackageId $PackageId But all three commands raise the same exception stating there is a missing resource. Then I tried using the bot itself, calling IAudioSocket.Send method, described here : https://microsoftgraph.github.io/microsoft-graph-comms-samples/docs/bot_media/Microsoft.Skype.Bots.Media.IAudioSocket.html The announcement works, but every participant can hear the announce, which is not desired in our case. Finally, I tried using audio routing groups, like described here : https://learn.microsoft.com/en-us/graph/api/call-post-audioroutinggroups?view=graph-rest-1.0&tabs=http The call to the GRAPH API works, putting the bot as unique source, and one participant as receiver, but the announce is still broadcasted to all participants. A few additions, Retrieving all the audio routing groups failed, with the API described here : https://learn.microsoft.com/en-us/graph/api/call-list-audioroutinggroups?view=graph-rest-1.0&tabs=http So my question : is there a way to change the default compliance recording bot announcement (“This call is being recorded”) by a custom one ? Thank you for your answer !MaskedCucumberApr 29, 2025Copper Contributor43Views0likes3CommentsNotifications not received at callback uri for bot
Hi, I am trying to implement an app (acting as the bot) outside of teams client to received call notifications for incoming calls and direct them to appropriate agent based on business logic. I have the app registration and bot registration set up. For the bot, I have the teams channel set up with the calling webhook url set to my ngrok url, which tunnels to my local app. I am able to make outbound call with graph api to an internal user by specifying the userId in invitationParticipantInfo. I am also able to make inbound call from internal user to the bot through teams client by directly clicking on the call button for the bot. I can receive the callback notifications at the registered ngrok url in both cases. I have two resource accounts, a call queue and a ivr. Both have phone numbers assigned to them. Things I am stuck on: making an outbound call to PSTN from my app (https://learn.microsoft.com/en-us/graph/api/application-post-calls?view=graph-rest-1.0&tabs=http#example-9-create-peer-to-peer-pstn-call-with-service-hosted-media) making an outbound call on behalf of a queue to PSTN from my app receiving incoming call notification at my app when PSTN calls a resource account (queue or ivr) or a user Things I tried: I tried setting the source in Call object to the following, with id being queue account id, ivr account id, user account id, but all of them gave me an error "Call source identity invalid." with code "7507" and responseStatusCode "403". // initializing graph client ClientSecretCredential credential = new ClientSecretCredentialBuilder() .clientId(CLIENT_ID) .clientSecret(CLIENT_SECRET) .tenantId(TENANT_ID) .build(); GraphServiceClient graphClient = new GraphServiceClient(credential, "https://graph.microsoft.com/.default"); Call call = new Call(); // setting source ParticipantInfo source = new ParticipantInfo(); IdentitySet appIdentitySet = new IdentitySet(); HashMap<String, Object> additionalData = new HashMap<String, Object>(); Identity applicationInstance = new Identity(); applicationInstance.setDisplayName("Calling Bot"); applicationInstance.setId(<some id>); additionalData.put("applicationInstance", applicationInstance); appIdentitySet.setAdditionalData(additionalData); source.setIdentity(appIdentitySet); call.setSource(source); // setting target LinkedList<InvitationParticipantInfo> targets = new LinkedList<>(); InvitationParticipantInfo invitationParticipantInfo = new InvitationParticipantInfo(); IdentitySet phoneIdentitySet = new IdentitySet(); HashMap<String, Object> additionalDataForPhone = new HashMap<>(); Identity phone = new Identity(); phone.setId("+12223334444"); additionalDataForPhone.put("phone", phone); phoneIdentitySet.setAdditionalData(additionalDataForPhone); invitationParticipantInfo.setIdentity(phoneIdentitySet); targets.add(invitationParticipantInfo); call.setTargets(targets); // additional fields call.setCallbackUri("https://<domain>.ngrok-free.app/api/callbacks"); LinkedList<Modality> requestedModalities = new LinkedList<>(); equestedModalities.add(Modality.Audio); call.setRequestedModalities(requestedModalities); ServiceHostedMediaConfig mediaConfig = new ServiceHostedMediaConfig(); call.setMediaConfig(mediaConfig); call.setTenantId(TENANT_ID); // making the call Call result = graphClient.communications().calls().post(call); Questions: Which part of the configuration am I missing? I'm suspecting that it's because my bot is not linked to a resource account. There are some powershell commands that I'm supposed to run as part of the set up, which I didn't because of some company configuration that doesn't allow me to do it. I think creating the resource account in teams admin center is equivalent of creating an application instance. I would like to know whether this is indeed the problem. If it is due to not linking the app to my resource accounts, how do I do it without powershell? I can't find documentation online about it. Is it possible to receive incoming call notifications at my app that's linked to ngrok when the incoming call is for a specific user? Any help is appreciated! Thank you!xddeniseApr 28, 2025Copper Contributor68Views0likes4CommentsWorkflows - Posting a Card
I'm in the process of migrating our Jira integration with teams from using the soon to be deprecated Connectors, to Workflows. I have two problems that I can't see to overcome. 1. All the messages are posted as '[My Name] via Workflows posted a new message'. Is there any way the message can come from another user or no user? 2. The preview for the messages (in the notification popup and Activity screen) is 'Card', instead of anything useful. Together this makes the notifications not very useful. What I have done: The workflow is set up And what is being posted to the webhook is (for example). { "type": "message", "attachments": [{ "contentType": "application/vnd.microsoft.card.adaptive", "contentUrl": null, "content": { "type": "AdaptiveCard", "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.4", "body": [{ "type": "ColumnSet", "columns": [{ "type": "Column", "width": "auto", "items": [{ "type": "Image", "url": "https://i.imgur.com/FrVumxY.png", "size": "Medium" } ] }, { "type": "Column", "width": "stretch", "verticalContentAlignment": "Center", "items": [{ "type": "TextBlock", "size": "Medium", "weight": "Bolder", "text": "Component Missing [ADP-xxx]" } ] } ] }, { "type": "TextBlock", "text": "Initiator: ", "wrap": true }, { "type": "TextBlock", "text": "ADP-xxx: Fixing reset password validation", "wrap": true, "weight": "Bolder", "color": "Accent", }, { "type": "TextBlock", "text": "Status: QA Ready", "wrap": true }, { "type": "TextBlock", "text": "Type: Bug", "wrap": true }, { "type": "TextBlock", "text": "Assignee: ", "wrap": true } ], "actions": [{ "type": "Action.OpenUrl", "title": "Open in Jira", "url": "https://xxx.atlassian.net/browse/ADP-xxx" } ], "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.4" } } ] } I have tried posting various different combinations of summary attributes with no effect. Is there a whole better way of doing this, or is there a few tweaks I can make?RayN925Apr 28, 2025Copper Contributor2.1KViews0likes3CommentsWhy am I failing to update meeting event subscriptions in Developer Portal Bot Management
I want to receive meeting participant events. I referred to docs. In the Meeting event subscriptions section of the Developer portal, I turned on 'Participant join' and 'Participant leave', and saved the settings. However, a 'Failed to update meeting event subscriptions' error occurs. How can I fix this issue?"KeisukeUEdaApr 28, 2025Copper Contributor21Views0likes1CommentNotification bot create card then add reply to that card
namespace MyTeamsApp5.Controllers { [Route("api/notification")] [ApiController] public class NotificationController : ControllerBase { private readonly ConversationBot _conversation; private readonly string _adaptiveCardFilePath = Path.Combine(".", "Resources", "NotificationDefault.json"); public NotificationController(ConversationBot conversation) { this._conversation = conversation; } [HttpPost] public async Task<ActionResult> PostAsync(CancellationToken cancellationToken = default) { // Read adaptive card template var cardTemplate = await System.IO.File.ReadAllTextAsync(_adaptiveCardFilePath, cancellationToken); var pageSize = 100; string continuationToken = null; do { var pagedInstallations = await _conversation.Notification.GetPagedInstallationsAsync(pageSize, continuationToken, cancellationToken); continuationToken = pagedInstallations.ContinuationToken; var installations = pagedInstallations.Data; foreach (var installation in installations.Where(o => o.Type == NotificationTargetType.Channel)) { // Build and send adaptive card var cardContent = new AdaptiveCardTemplate(cardTemplate).Expand ( new NotificationDefaultModel { Title = "New Event Occurred!", AppName = "Contoso App Notification", Description = $"This is a sample http-triggered notification to {installation.Type}", NotificationUrl = "https://aka.ms/teamsfx-notification-new", } ); var messageResponse = await installation.SendAdaptiveCard(JsonConvert.DeserializeObject(cardContent), cancellationToken); if (messageResponse != null) { var mentionActivity = MessageFactory.Text($"this is a reply."); mentionActivity.ReplyToId = messageResponse.Id; await installation.Adapter.ContinueConversationAsync( installation.BotAppId, installation.ConversationReference, async (turnContext, cancellationToken) => { turnContext.Activity.ReplyToId = messageResponse.Id; await turnContext.SendActivityAsync(mentionActivity, cancellationToken); }, cancellationToken); } } } while (!string.IsNullOrEmpty(continuationToken)); return Ok(); } } } So I'm trying to create a notification bot for a ticket system. Where when the notification bot is called, it posts the ticket card to the channel , then posts a reply to this card with a message. However the above code creates new threads for each message and not a response for the second one. I think it's related to the turnContext not being the same maybe, so I'm not sure if it's actually possible. Any help would be great.mattphillipsApr 28, 2025Copper Contributor18Views0likes1CommentHow to extract audio from mp4
In a Teams chatbot, there's no direct option to accept audio input in personal chats. Users cannot record and send audio directly as a message. However, Teams provides a "Record video clip" feature, which users can utilize to record audio, this can be sent as an MP4 file. To process this with a speech-to-text service, we need to extract the audio from the MP4 and convert it to an MP3 format. Once converted to MP3, we can then pass it to Azure Speech Service to extract the text from the audio. Would that be a possible solution to use audio in personal chatbotLakshmi_145Apr 24, 2025Iron Contributor53Views0likes3CommentsDeeplink Navigation Issue in Published MS Teams Custom App on Mobile Devices (iOS & Android)
Description: We are experiencing an issue with navigation in our published MS Teams custom app. The app has a Tab with personal scope and a Bot. The problem arises for a few users (mostly on iOS devices) when they navigate to the Tab from the chat section of the Bot by clicking on a button that deeplinks to the Tab. Expected Behavior: The button click should trigger the deeplink and open the designated Tab and the specific page within the Tab in MS Teams app. Actual Behavior: iOS devices display an error message "Link not Supported. You can't open this link on the mobile app. Please open it on the desktop or web app." Android devices successfully open the Tab, but navigate to the default home page instead of the intended page within the Tab. Error Message: Details: The navigation works perfectly on the Desktop App and Web Browser. Sample Deeplink Used: let obj = { "params": paramsObj, "subdomain": subdomain, "pageRoute": "home" }; let subEntityId = { "subEntityId": obj }; var encodedWebUrl = ""; var encodedContext = encodeURI(JSON.stringify(subEntityId)); let tabUrl = "https://teams.microsoft.com/l/entity/" + manifestObj.id + "/agentTabId?webUrl=" + encodedWebUrl + "&label=entityLabel&context=" + encodedContext; cardObj = { ... { title: 'Open in Tab', type: 'Action.OpenUrl', url: tabUrl, } ... } Request: We need assistance in resolving this issue to ensure smooth navigation for all users, especially on iOS devices. Additionally, we need guidance on ensuring that Android devices navigate to the correct page within the Tab rather than the default home page. Thank you for your support.santhosh_sjApr 24, 2025Copper Contributor504Views0likes7CommentsWhen the Bot's app secrets expires, how to fix. .
Hi, Just realized that the secret was expired from one of our Teams chatbot. On the Developer portal, there was nice button "Add a secret" under Tools \ Bot Management. And that was working fine, it adds the new secret and I was able to remove the expired. The only question is, was this enough? Or should I do something extra steps to get the new secret into use? After few hours, that still not react to me.Petri-XApr 22, 2025Bronze Contributor62Views0likes3CommentsUsing Graph API to create a OneNote tab in a Teams Channel
Hello, I'm trying to create a new tab in an existing channel that opens a OneNote notebook using Graph API. According to official documentation (https://learn.microsoft.com/en-us/graph/api/channel-post-tabs?view=graph-rest-1.0&tabs=http), the call should look like this: POST https://graph.microsoft.com/v1.0/teams/{team-id}/channels/{channel-id}/tabs { "displayName": "OneNote", "email address removed for privacy reasons" : "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/0d820ecd-def2-4297-adad-78056cde7c78", "configuration": { "entityId": "<Notebook_id>", "contentUrl": "<OneNote_notebook_url>", "websiteUrl": "<OneNote_notebook_url>" } } It worked smoothly, but since recently, when you open the tab in Teams (desktop or web), it shows an error message stating that "the application can't be reached". In the end, the tab is created but OneNote notebook is not opened. Reading the official documentation here: https://learn.microsoft.com/en-us/graph/teams-configuring-builtin-tabs#onenote-tabs it mentions that when creating OneNote tabs, "configuration is not supported". Does this mean now you can't specify the OneNote notebook to open in the tab using Graph API? Any suggestions or recommendations? Thanks in advance! FerranSolved1.4KViews0likes11Comments
Resources
Tags
- microsoft teams1,695 Topics
- developer1,317 Topics
- meetings229 Topics
- Chat219 Topics
- Administrator139 Topics
- Settings105 Topics
- Calling103 Topics
- files65 Topics
- teams53 Topics
- devices52 Topics