Forum Widgets
Latest Discussions
Notifications 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 24, 2025Occasional Reader30Views0likes2CommentsHow 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 Contributor48Views0likes3CommentsDeeplink 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 Contributor501Views0likes7CommentsUnable 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 23, 2025Brass Contributor87Views2likes3CommentsWhen 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 Contributor57Views0likes3CommentsUsing 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.3KViews0likes11CommentsSet work location via API (Graph?)
Hey community! The new work hours and location feature is rolling out for Outlook and Teams: Work Hours and Location in Outlook for Efficient Collaboration (admindroid.com) 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, JensJensK2023Apr 21, 2025Copper Contributor13KViews1like17Commentsfile upload option disappearing in teams bot
We have Teams bot (we're the developer). When users first start teams, they have the file upload option available under the + button next to the type a message box. However, shortly afterwards, this option disappears. Not all users, just some. Seems to occur for both Mac and Windows users. Our manifest looks like this: { "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.19/MicrosoftTeams.schema.json", "manifestVersion": "1.19", "version": "1.0.7", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "developer": { "name": "example", "websiteUrl": "https://www.example.com", "privacyUrl": "https://www.example.com/privacy", "termsOfUseUrl": "https://www.example.com/privacy" }, "icons": { "outline": "example_mono.png", "color": "example_portrait.png" }, "name": { "short": "example", "full": "example, your digital assistant" }, "description": { "short": "example is a digital AI assistant designed to streamline your workflow.", "full": "example is an advanced AI-powered professional assistant developed by example, crafted to enhance productivity and efficiency in the workplace. With a focus on accuracy and a professional demeanor, example assists with information retrieval, scheduling, communication, and various tasks, ensuring that you have more time to focus on what matters most in your business." }, "accentColor": "#fb9745", "bots": [ { "botId": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy", "scopes": [ "personal" ], "isNotificationOnly": false, "supportsFiles": true, "commandLists": [ { "scopes": [ "personal", "team" ], "commands": [ { "title": "New", "description": "Starts a new conversation" } ] } ] } ], "permissions": [ "identity", "messageTeamMembers" ], "webApplicationInfo": { "id": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy", "resource": "https://RscBasedStoreApp" }, "validDomains": [ "*.ngrok-free.app", "*.ngrok.app", "exampledev.ngrok.app" ] } ``` As far as I can see from the current manifest schema, the bot needs no other scopes. Is this a known bug or are we screwing something up with the config? Any help appreciated!barrettaboltApr 16, 2025Copper Contributor139Views0likes12CommentsReply to message is not working as expected
const { MessageFactory, TeamsActivityHandler, BotFrameworkAdapter, TurnContext, teamsGetChannelId, TeamsInfo } = require('botbuilder'); const properties = { 'membersAdded': [{ 'id': '28:17a' }], 'type': 'conversationUpdate', 'timestamp': '2022-08-11T10:54:30.482Z', 'id': 'f:ce9c82ab7a6feabc', 'channelId': 'msteams', 'serviceUrl': 'https://smba.trafficmanager.net/in/', 'from': { 'id': '29:1YqsjLwgg-0A_V8tL5P3hIw', 'aadObjectId': 'a0858f3e-d57759' }, 'conversation': { 'isGroup': true, 'conversationType': 'channel', 'tenantId': '3272b84e1', 'id': '19:PZppMpIo1@thread.tacv2' }, 'recipient': { 'id': '28:17720bfc7ba', 'name': 'bot 1' }, 'channelData': { 'team': { 'aadGroupId': '9ffd4120579', 'name': 'Ayesha Testing', 'id': '19:PZp9pIo1@thread.tacv2' }, 'eventType': 'teamMemberAdded', 'tenant': { 'id': '3284e1' }, 'settings': { 'selectedChannel': { 'id': '19:PZ1@thread.tacv2' } } } }; const BotConnector = require('botframework-connector'); const adapter = new BotFrameworkAdapter({ appId: '', appPassword: '' }); BotConnector.MicrosoftAppCredentials.trustServiceUrl(properties.serviceUrl); const context = new TurnContext(adapter, properties); const teamsChannelId = '19:PZpplOG9xxoOHhanG9pIo1@thread.tacv2'; console.log(teamsChannelId); const activity = MessageFactory.text('This will be the first message in a new thread'); const [reference] = await TeamsInfo.sendMessageToTeamsChannel(context, activity, teamsChannelId, process.env.MicrosoftAppId); await context.adapter.continueConversationAsync( reference, async turnContext => { await turnContext.sendActivity(MessageFactory.text('This will be the first response to the new thread')); }); Expected: Actual : When I want to send a Reply to the message but it is sending as a new message. And I have to update that reply message that certain times. Can you please look into that? Also Is there a way to batch send or update messages to users in personal chat, otherwise data might be inconsistent for users.Solved2.1KViews0likes8CommentsResponse AADSTS500014 error
Good morning. I have created a new app registration and grant to it the recommended permissions as described in the official documentation. STEP 1: I receive an access token successfully. STEP 2: With this key i am trying to create a new subsription bu a get a 400 bad request error with the following message: AADSTS500014: The service principal for resource 'https://plat.teams.microsoft.com' is disabled. This indicate that a subscription within the tenant has lapsed, or that the administrator for this tenant has disabled the application, preventing tokens from being issued for it. I have searched the web for a solution but i didn't find anything that helped me.pekarasApr 09, 2025Copper Contributor13KViews0likes6Comments
Resources
Tags
- microsoft teams1,693 Topics
- developer1,316 Topics
- meetings229 Topics
- Chat219 Topics
- Administrator139 Topics
- Settings105 Topics
- Calling103 Topics
- files65 Topics
- teams53 Topics
- devices52 Topics