The case is that we have a SharePoint Online site which allows external access by invitation only. In Yammer we have created a group for external users and have successfully added external users. From Yammer you can embed the code and paste it to a script editor web part, which works properly.
The embedded link
The default embed-code
<div id="embedded-feed" style="height:800px;width:400px;"></div>
<script type="text/javascript" src="https://s0.assets-yammer.com/assets/platform_embed.js"></script>
<script type="text/javascript">
yam.connect.embedFeed({
container: "#embedded-feed",
network: "externalcompany.com", // source network contoso.com
feedType: "group",
feedId: "1234567"
});
</script>
The Yammer feed (IT Pro Network as example)
Now, with external users they are a part of their own Yammer network with the URL https://www.yammer.com/externalcompany.com and not the company that hosts the group https://www.yammer.com/contoso.com This make the embedded script fail. So I need to add a variable in the network section of the embedded code. Something like . . .
yam.connect.embedFeed({
container: "#embedded-feed",
network: company, // instead of network: "externalcompany.com"
feedType: "group",
feedId: "1234567"
});
Is there a way to grab the external user network from their company e-mail address (or something) and assign it to the company variable?