Forum Discussion

CedricZimmermann's avatar
CedricZimmermann
Brass Contributor
Apr 22, 2025

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 https://learn.microsoft.com/en-us/graph/api/chat-post-installedapps?view=graph-rest-1.0&tabs=http and https://learn.microsoft.com/en-us/graph/api/channel-post-tabs?view=graph-rest-1.0&tabs=http 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:
  1. Create an AAD App registration with required application permissions (to install apps and manage tabs in chats), ie at least the following:
    1.  TeamsAppInstallation.ReadWriteAndConsentForChat.All
    2. TeamsTab.ReadWriteForChat.All
  2. Create a Teams application with a static tab with "groupChat" scope
  3. Install app in chat: POST https://graph.microsoft.com/v1.0/chats/:chatId/installedApps with body below
  4. 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 https://learn.microsoft.com/en-us/answers/questions/2259024/add-tab-to-chat-request-stopped-working-now-it-ret?source=docs in our logs but it is apparently resolved now.

11 Replies

  • Hey Nivedipa-MSFT , yes it keeps on happening on all our environments.
    A few things I forgot to mention in my previous message:
    The user id from the error message does not seem to correspond to any of our user on the given tenant, in the example above, the error points to a call to users/c0cfdd6b-d64d-42e1-8111-0881725f68ff:

    https://graph.microsoft.com/v1.0/users/c0cfdd6b-d64d-42e1-8111-0881725f68ff/licenseDetails?$select=skuId,skuPartNumber,servicePlans

    c0cfdd6b-d64d-42e1-8111-0881725f68ff does not match any user of even app/entity in our tenant. 

    And the property from the body in the JSON object was concealed:

    "teamsApp @ odata . bind" // adding spaces so it is not seen as an email address, hopefully.

     

    • Nivedipa-MSFT's avatar
      Nivedipa-MSFT
      Icon for Microsoft rankMicrosoft

      @CedricZimmermann -

      The error message shows that the user ID c0cfdd6b-d64d-42e1-8111-0881725f68ff doesn't match any user in your tenant. This might happen if the user ID is wrong or if the user has been deleted. Please double-check the user ID and make sure it exists in your Azure Active Directory (AAD).

      If the user ID is correct, check that your application has the right permissions to access user details in AAD. Sometimes, not having enough permissions can cause this error.

      The error with "teamsApp @ odata . bind" suggests there might be a syntax issue in your request. Make sure the property name is formatted correctly. For example, it should look like this: "teamsApp@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/{appId}".

      Don't forget to replace {appId} with the actual ID of the Teams app you want to bind.

      • CedricZimmermann's avatar
        CedricZimmermann
        Brass Contributor

        Hey Nivedipa-MSFT
        Where is this user coming from? As I said, we're trying to add a tab to a chat via a GraphAPI call using application (and not delegated) permissions. 
        We didn't change anything on our tenants and it stopped working on all our tenant at the same time. Could it be related to a change on your side?

        There is no error with email address removed for privacy reasons, it's just this forum that removed it from my initial message because it looks like an email address. There can't be any error associated with that, this is the JSON payload that we send

  • BrendonSteer's avatar
    BrendonSteer
    Copper Contributor

    We are experiencing the exact same issue that appeared to start around the same time.  A service principal using application permissions returns the above error when attempting to pin a static tab to a channel.  We have found the issue to be consistent and failing every time.  

    Using the same body payload as a user with the appropriate delegated permissions (even one that does not have membership of the team but simply has the required delegated permissions, ie Group.ReadWrite.All and Directory.ReadWrite.All) succeeds every time.  The issue appears to affect service principals using application permissions.

    The issue is affecting multiple tenancies (DEV,UAT,PROD).

Resources