question

ManishKumar-9500 avatar image
0 Votes"
ManishKumar-9500 asked Mamatha-MSFT answered

Show "unread" count on custom app tab name

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.

office-teams-app-dev
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@ManishKumar-9500,
As we are mainly responsible for general question of Microsoft Teams, your requirement related to script is not in our scope. I will change office-teams-windows-itpro tag to office-teams-app-dev tag. Hope you get more efficient supports.

0 Votes 0 ·

Thankyou @SharonZhao-MSFT

0 Votes 0 ·

@ManishKumar-9500 - Could you please confirm are you trying to create a personal tab or Team tab?

0 Votes 0 ·

HI @Mamatha-MSFT
I am creating a Team Tab.

0 Votes 0 ·
Mamatha-MSFT avatar image
0 Votes"
Mamatha-MSFT answered ManishKumar-9500 commented

Hi @ManishKumar-9500 - 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.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hey @Mamatha-MSFT thanks for your reply.

I need to change the tab name for my custom app in MS teams via javascript sdk. I need to add an unread notification count on the tab name, which is calculated from my web page and I need to show that unread count in the tab name.

0 Votes 0 ·
Mamatha-MSFT avatar image
0 Votes"
Mamatha-MSFT answered Mamatha-MSFT edited

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


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Mamatha-MSFT
Yes I have already checked this document. According to this document we can rename the tab name on savehandler when we are installing the app in MS Teams, but, I need to change the tab name based on my web page conditions after the web page load.

0 Votes 0 ·
Mamatha-MSFT avatar image
0 Votes"
Mamatha-MSFT answered

@ManishKumar-9500 - 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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.