Side-by-side SharePoint Team Sites and Yammer Private Groups App #BIWUG

Hi,

Here is the demo code of a solution I showed at BIWUG. As a reminder, here is what the App does:

  • When installed into the Host Web, it creates a corresponding Private Group in your Yammer Network and creates a SharePoint Group “Yammer – [Yammer Group ID]
  • It attaches security event receivers to the Host Web group in order to keep your SharePoint Team Site membership in sync with the dedicated Yammer Group. The event receivers only check the membership of the SharePoint group created by the App
  • The App ships with an App Part that you can use to display the Yammer Group into SharePoint. You don’t need to configure it as it will automatically detect to which Yammer Group your team site is bound

Caution : for the time being, it doesn’t seem possible to delete a Yammer Group via the REST APIs. Therefore, when you delete the SharePoint Group and/or remove the App from the host web, there is no way to remove the Yammer Group automatically..
[Update 08/2015] this is actually possible to delete a yammer group using the REST API. I didn’t find the endpoint at the time of writing the post but you simply need to create a DELETE request against /…./api/v1/groups/id of the group.json
From a technical point of view, the App makes use of :

  • A SQL Azure database to store the App configuration. Whenever the App gets added/removed to/from an Host Web, it stores the Yammer Group ID and the SharePoint Group ID for the given team site
  • An Azure Storage Queue to log events
  • An Azure Web Site to host SharePoint Remote Event Receivers
  • A Yammer App that you must create on your Yammer Tenant to retrieve a ClientID and a Global Admin Token (as explained during my session)

In order to test it, the only absolutely required step is to create a Yammer App and grab the ClientId+GAT. You also need to create a ClientId/ClientSecret in SharePoint and update the web.config file of the remote web. In the demo code, find all occurrences of Your_, these are all the placeholders in which you have to provide your own values.

You can download the code here

Happy Coding

Advertisements

About Stephane Eyskens

Office 365, Azure PaaS and SharePoint platform expert
This entry was posted in SharePoint Online, Yammer and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s