Use Search to query Office 365 Groups and 365 groups
Original article address
I have been using the new Office 365 Groups feature for some time. I want to see how I use them on a common SharePoint Online site. In my example today, I created two public groups instances and three private groups instances.
My first thought was to use Search. As I know, the group is stored in the background by site collection. I just want to find out which WebTemplate it uses. In search, you can easily find the name of the site collection by viewing a document. It is stored in/Sites/<GroupID>. When you first create a group, you can see your Group ID.
With the rest api, We can splice/_ api/web to an existing URL, suchHttps://tenant.sharepoint.com/sites/GroupID/_api/web.By viewing these results, Looking finds the WebTemplate used by the site. The name isGROUP. With this, we can useWebTemplateManaged properties to query. The query we want is very simple:
WebTemplate: GROUP
You can enter this keyword in the Search box of the Search Center.
I have five groups, but only two are displayed here. Through some research and other queries, I found that no matter how I look up, search will never find private groups or the documents in it. I don't know if it is a bug or is it designed like this. This may still be useful to you. You can use this query in the Content Search web part.
I hope we can query private groups in the future. Then, if you use many public groups, it is useful to query them.
Published Dec 16 2014, AM by CoreyRoth
Filed under: SharePoint, Enterprise Search, REST, Office 365, SharePoint 2013, Groups