Embedding Yammer into an application

Not applicable

I am not a developer, and I don't play one on TV. But I have been asked this and I hope you can help!

"I got a technical question for you. I'm developing an application called Macbeth and we already got a Yammer group where we post lots of tips about how to use the tool more efficiently. We'd like to go further and integrate our group feed directly into the application. We could embed the Yammer widget directly, but it's too massive and as it comes in an IFRAME we cannot really control the rendering. We'd prefer something lighter like a list of last posts' title for a start. The yammer api documentation is a good resource but the authentication seems a bit tricky to put in place. Our application is a pure JavaScript client app and to we need to call the api with a security token to be able to fetch the data. There is no SSO in place apparently. It seems that a good way to achieve that is to register a new application in Yammer. I'm not sure I should try that, because I'm not sure that the app I create is available only in Cargill, I can't afford to expose the app and its url outside of Cargill. Did anyone already did that? Thanks for the help."
Bueller? Bueller? @Tom Kretzmer ?
16 Replies

We've been pretty far down this path, Melanie. Some folks within MSFT have rebuilt an entire feed experience using the API (both supported and unsupported calls). This is an approach Yammer isn't terribly thrilled with, but neither have they provided an alternative, instead suggesting that we "deep link" into the native Yammer app from your LOB app. Implementing a list of the most recent posts should be straightforward, as it only requires the user's credentials to retrieve read-only data. I'm assuming you'd deep link to the threads in the Yammer app from that list.


Yes, you'd register an app in Yammer. All apps are "local" and not "global" by default, meaning they're only available to members of your network. This is handled through OAuth. So, there's no risk of anyone outside of Cargill even knowing about the app unless you specifically request that the Yammer team make the app global.


Hope that helps, as that's about as much as this slightly techy non-dev knows about it. I can connect you to smarter bears, however.

One additional consideration with setting up an application for Yammer is that the application is tied to the account that creates it, so if you create an application at https://www.yammer.com/client_applications/ using your personal work account, if you end up leaving your company and your Yammer account gets shut down, there goes any applications tied to that account with it.

Right - so we set those up using service accounts.

Hey Mel,

Angular JS using the Rest calls the offer up is how we've done it  - still working through the final service account / authentication piece to not force the login - but you can add the app into pretty much any web app - just need to register the CORS - or javascript origins. Demo screen shot below - but you can make it look like whatever you want.


I've posted the source code for this in another of the development threads on this board..



Hi Chris - if you are able to share how you connected the service account with authentication or connect me to the folks who did it - that would be a win for me and the app we are working on internally here.

Hey @Rich Burdes, any chance you can link the source code here; I took a look through your recent posts but can't find it referenced anywhere

I thought that the app you build is tied to the account used to register the app.  So to use a service account, log in as that service account (basically a shared username / password with a generic name), create a Yammer account, and then log into Yammer with that account.  Once logged in as that account, create the app and get the OAuth bearer token.  Then, use that bearer token within your application.  Downside is that the user experience is as the service account, rather than as the user, so all the nice user-specific feeds that Yammer gives is gone.


Am I missing something? 


So for Melanie's problem, the authentication would be as the service account, and the credentials are buried within the app.  Right?


Yes, I believe that's how we did it. The advantage is that the service account can be (really, needs to be) a verified admin, so you get access to all kinds of goodness.

Mel, another interesting take that we tried was to get tyGraph to create a web service on the front of their data so that we can use analytics queries to get titles and links to threads that are much more interesting to put on a web site than just the latest in the feed...

Sorry Stephen - may bad was reply on my phone and being lazy - I think there is a reference to this from Mike.



Hi Tom,

Yeah - I'm trying to see if I can retain the actual users token into local storage in the users browser profile - so once they log in and allow the app I can try to recall the local storage data if not logged in, but has retained a valid token - its implied its possible in this post - right at the bottom..




If I crack it I'll share it..

That's the approach I chose and it works very nice. Did you already crack it?

Hey Johannes,

Been sidetracked, got to the point where I can hold thing in the browser cache, but hoping to get back into it by next week once we close out another project. If you have a 'here is one I made earlier' to share that would rock :) No biggie if not as we'll get it sorted and share back here.



Why do you need to get the local user when you can impersonate them?

Hey Simon - maybe I read Impersonation wrong, but I thought a verified Admin could use it to pull info on behalf of a user vs using it to help with a my feed type app to use on an intranet home page - so are you saying any old user (if we enabled a valid token in the app) could auto authenticate against their name to view their feed and so by pass the need to log in if they did not have an existing yammer session / cookie in place?

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
17 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
11 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies