Yammer Embed should work but there are times when you could end up chasing your tail trying to understand why it does not work. This is especially true if you are new to using Embed. So I thought I’d put a post together that describes my triaging process when things go wrong.
Start from something that works!
Now I know it seems simplistic but the embed code is *code* and by its very nature sensitive to typo’s. Hence I recommend using the widget to generate code especially if you are new to it.
When triaging problem, I recommend starting with the Yammer Widget as it allows you to test Embed whilst ruling out SharePoint and other gremlins. It’s a relatively straight forward fill in the blanks exercise. I’d start with simply setting the Widget to display your home network. As shown below:
If you cannot get the Widget to work, then it is likely that you have either browser or network related problems. In the case of your browser make sure you are using a supported browser e.g. Internet Explorer 11. If you are using an unsupported browser (refer to the ‘Browser and system requirements’ section), then you can expect a degraded or non-existent Yammer experience. Yammer contains code that identifies the type of browser and modifies the Yammer experience accordingly e.g.
If it is not the browser and the widget fails to work, then I’d start suspecting either a Service Outage (which you should be aware of as these are posted in the Office 365 Admin Centre) or a configuration issue with your network. Later in this post I describe a couple of methods for confirming the basic configuration of your network.
Use the code from the widget
Assuming that you can get the widget to work, the next step is to reuse the widget code in a SharePoint page. For this you need a page in your environment that is ‘straight out of the box’. By this I mean it does not have additional styling or code as you might find in an Intranet page. The reason for using a basic page is to rule out any issues like JavaScript or CSS clashes. I use the code from widget as it will be error free. A common mistake when hand coding embed script is to miss off a comma and a missing comma can be hard to spot!
In order to perform this test, you’ll need the code from the widget which has been topped and tailed with some additional code to tell SharePoint where to get the Yammer JavaScript file from and that it is code to be executed. If you need a point of reference for this take a look at the basic example at the top of my earlier blog post about using Yammer Embed.
I would conduct this test using a Content Editor Web Part (CEWP) and not a Script Editor Web Part (SEWP). Using a CEWP means that you can vary the code without losing access to the page you are testing it in! Trust me it is super annoying to paste some flaky code into a SEWP for you to lose access to the page and have to roll a version back (if you have versions enabled!) or worse still delete the page and start again.
You should be able to get the basic code to work and from there you can start testing in the target environment e.g. an Intranet page. If that fails, then you have a SharePoint configuration or code security problem.
Check your SharePoint configuration
I’ve only used SharePoint 2013 and SharePoint Online and Embed works fine in both environments. I have read reports from users of SharePoint 2010 that Embed can fail in that environment. In some cases, this is down to SharePoint rendering the page in such a way that the browser switches to a compatibility mode which is lower than the supported mode.
Another potential blocker to Embed working is whether third party code is allowed to execute in your SharePoint environment. At this point it would be worth following my network configuration checks before pointing your finger at your SharePoint Administrator!
Check your network
Network configurations and firewalls can introduce a level of variability and complexity that can seem daunting. However, there are some really simple steps that you can perform prior to involving your network administrator.
I’d start by checking that you can access:
https://c64.assets-yammer.com/assets/platform_embed.js
You can do this test by pasting the address above into the address bar in your browser. The result should be that your browser will attempt to download a file:
If that fails, then there is either a Browser trust issue or more likely your firewall is getting in the way. In this context I use the term ‘firewall’ quite loosely. The file could be blocked by your firewall, it could be intercepted by your anti-virus application, a proxy service might be getting in the way etcetera etcetera. If the JavaScript code cannot be loaded the Yammer Embed part will not work! It would be odd if you can get the Widget to work but not be able to download the file.
Go back to basics
If you’ve read this far and are still struggling to get Embed to work, then perhaps you need to take a big step backwards and get your network administrator to confirm that the basics required to get Yammer to work are also in place. This might seem odd, especially as you’ll no doubt be able to access Yammer through your browser but some networks are tightly nailed down. Microsoft recommend that to successfully use Yammer a number of addresses and rules are allowed through your network and firewalls. Some administrators do not like opening up all of the recommend connections and so it’s worth double checking that they have. As a point of reference the firewall and trust rules are detailed here https://support.office.com/en-us/article/Office-365-URLs-and-IP-address-ranges-8548a211-3fe7-47cb-abb1-355ea5aa88a2#BKMK_Yammer . It’s worth them also checking the SharePoint requirements (listed on the same page several sections above the yammer ones).
As I mentioned earlier it might also be worthwhile talking with your SharePoint Administrator as they might have configured SharePoint to prevent the execution of code etc. If all else fails raise a support ticket with Microsoft.