Yammer Tab just got out last week, but of course I needed to check if it can be added to a team via Graph API:
- Yes it is possible.
- No, you have to do some detective work manually first
Adding a certain Yammer groups as tabs makes team members aware of the Yammer and also makes it easy to participate there as well. You can add a company wide discussion to every team in the company if you so decide. Or it could be a Product innovation Yammer group that certain team’s need to know about and interact with it. Or there could be a topic that is really important to some/most in the company (like .. news discussion).
Why to add Yammer tab to teams?
Yammer is the great place to engage your whole company. There are good benefits when using a Yammer over a bunch of company teams
- Yammer has the Discovery and All feeds: You get the big picture without clicking through all Teams and their channels to read messages.
- You can engage people even when they don’t belong to a team
- Discovery feed can pop your message up to someone in the company you didn’t even think a relevant person – but later on it turns out that person was crucial. There is a element of engagement without borders.
- When Yammer is added to a team as a tab it reminds team users’ that there are others working in the company as well. And makes connecting “the other loop” easier and more intuitive.
- Perhaps ICT wants to continue working on a issue that was only reported in the Yammer -> getting the message into team channel is now really easy – especially when you have the tab already in place.
- Adding Yammer tabs will lower other Yammer usage: you don’t have to transit to another tool, instead this strengthens Teams as Hub/UI of Work.
Let’s prepare our Yammers
If you are using a Yammer actively then you might have good ideas what groups are used company wide by everyone. These are groups like Yamnet or Company official or just simply Finland (when you have multiple countries or regions in the company). Figure out which groups you want to add to which teams and prepare a script or Flow for this processing. I am not doing this part in this post.
Before proceeding, add the desired Yammer groups (or topics) as tabs to a team channel that does not have much else in it. Then figure out EntityId and ContentURL for those groups. So far the only way I know is to retroactively get these. This blocks the fully automation of Yammer tab at this point (you need to preselect groups and topics to be able to add them ).
GET https://graph.microsoft.com/beta/teams/{teamID}/channels/{ChannelID}/tabs
Graph Explorer is a great tool to get required results out.
Yammer Groups have the format of https://teams.yammer.com/groups/ and topics start as follows: https://teams.yammer.com/topics/
Adding a Yammer Group as tab
Use the same url for POST request ans for getting the tab settings.
POST https://graph.microsoft.com/beta/teams/{teamID}/channels/{ChannelID}/tabs
Request Body for the Group. Replace this example with your EntityID and ContentURL.
{
"teamsAppId": "db5e5970-212f-477f-a3fc-2227dc7782bf",
"name": "Company%20Yammer",
"displayName": "Company%20Yammer",
"sortOrderIndex": "10000",
"messageId": null,
"configuration": {
"entityId": "https://teams.yammer.com/groups/eyJfdHlwZSI6EntityIDiaWQiOiIxNDQ5MjIzMyJ9?client=teams",
"contentUrl": "https://teams.yammer.com/groups/eyJfdHlwZSI6ContentURLiaWQiOiIxNDQ5MjIzMyJ9?client=teams",
"removeUrl": null,
"websiteUrl": null,
}}

Adding a topic Yammer tab
This uses the same POST URL as Group, only the EntityId and Content URL are bit different.
{
"teamsAppId": "db5e5970-212f-477f-a3fc-2227dc7782bf",
"name": "%23Workhub",
"displayName": "%23Workhub",
"sortOrderIndex": "10000",
"messageId": null,
"configuration": {
"entityId": "https://teams.yammer.com/topics/eyJfdHlwZSI6EntityIDiaWQiOiIzNzUxNDM4MiJ9?client=teams",
"contentUrl": "https://teams.yammer.com/topics/eyJfdHlwZSI6ContentURLiaWQiOiIzNzUxNDM4MiJ9?client=teams",
"removeUrl": null,
"websiteUrl": null,
}}

Lessons learned
While I was a bit disappointed there isn’t yet a way to generate that EntityID and Content URL from Yammer IDs I am glad this addition can be done centrally. This way a company can add certain Yammer tab (or two, if a topic is important for some teams) behind the scenes. This makes Yammer familiar to teams since they face it in their work channels.
What I discovered, is that you can’t add similar tab (Group / Topic) twice into a same channel. So, you can’t have #WorkHub and #News Yammer tabs. However you can add a group tab and a topic tab. Either by manually or by code from behind the scenes.
You can use this, again, as a step towards making Teams the Hub for work. Adding a auto-shown News-channel via Graph you can populate that channel with a link to News-page (modern SharePoint) and add a Yammer-tab to both general and News-channels. Why both? In case adding it to General-channel fails (there is already a more important Yammer Group tab to the team added by them).