in

Dot Net Mafia

Group site for developer blogs dealing with (usually) .NET, SharePoint 2013, SharePoint 2010, Office 365, SharePoint Online, and other Microsoft products, as well as some discussion of general programming related concepts.

This Blog

Syndication

Archives

Corey Roth [MVP]

A SharePoint MVP bringing you the latest time saving tips for SharePoint 2013, Office 365 / SharePoint Online and Visual Studio 2013.

Querying Office 365 Groups with Search

I have been working with the new Office 365 Groups feature a little bit and I wanted to see how I could surface them from a regular SharePoint Online site.  In my example today, I have created two public groups and three private groups.

GroupList

My first thought was to use Search.  Ultimately, I knew the file storage behind groups was powered by a site collection.  I just need to figure out which WebTemplate was being used.  You can see the name of the site collection fairly easily by looking at one of the documents in search.  It’s simply stored at /sites/<GroupID>.  You can see your Group ID when creating the group initially.

CreateGroupWithGroupId

Using the REST API, we can then just assemble the URL with /_api/web onto the existing URL such as https://tenant.sharepoint.com/sites/GroupID/_api/web.  Looking through these results I found out that the WebTemplate for the site is simply named GROUP.  Now that we have this, we can query search using the WebTemplate managed property.  The query we want is simply:

WebTemplate:GROUP

You can type this directly into the keyword textbox in your Search Center.

GroupsInSearchCenter

Now wait a minute.  I am in five groups but it’s only showing me two.  After doing some research and some additional queries, I discovered that no matter what I did, search could never find private groups or the documents within them.  I am not sure if this is a bug or it is intentional, but as of right now you can only see public Groups with search.  Still this might be valuable to you, so you could always use this query inside the Content Search web part.

GroupsInContentSearch

I am hoping that we can query private groups as well in the future, but it’s still nice to be able to query your groups if you use a lot of public ones.

Comments

 

???????? » Search Results Web Part Office 365 said:

Pingback from  ????????  &raquo; Search Results Web Part Office 365

June 2, 2015 12:25 PM

Leave a Comment

(required)  
(optional)
(required)  
Add

About CoreyRoth

Corey Roth is an independent SharePoint consultant specializing in ECM, Apps, and Search.
2015 dotnetmafia.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems