Show "unread" count on custom app tab name

Manish Kumar 1 Reputation point
2021-06-19T16:05:09.447+00:00

I am showing a custom web page in Teams through a custom tab by using microsoftTeams javascript sdk.
The page returns todo list as per user wise. I have to show per user's messages count concatenated in a custom tab name.
Ex. If the custom name is "New Ticket" and a user unread message is 3 then the custom tab name should be "New Ticket(3)" with bold text.

Is this possible or similarly any other way where we can show this? 

Initially when MS teams start I am able to set the tab name(using suggestedDisplayName). while I need to change the tab name after my web page code execution.

Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,821 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Mamatha-MSFT 156 Reputation points
    2021-06-22T06:40:50.137+00:00

    Hi @Manish Kumar - You can display user specific data stored in Azure Active Directory in tab using Azure AD authentication. Please go through this documentation. But currently there is no API to get unread messages in teams.


  2. Mamatha-MSFT 156 Reputation points
    2021-06-28T06:44:29.577+00:00

    @Manish Kumar Using microsoftTeams.settings.setSettings() you can modify, reconfigure, or rename a channel or group tab. Please go through this documentation for more info


  3. Mamatha-MSFT 156 Reputation points
    2021-06-29T10:27:19.267+00:00

    @Manish Kumar - For your scenario you can use Graph API to update tab in a channel using below request.

    PATCH https://graph.microsoft.com/v1.0/teams/{id}/channels/{id}/tabs/{id}  
    Content-type: application/json  
    Content-length: 211  
      
    {  
      "displayName": "My Contoso Tab - updated"  
    }  
    

    For more details please check this documentation.

    0 comments No comments