1

There are multiple options to create office 365 groups in Office 365. Eg. From Admin center, Teams, Modern Team sites, Outlook, planner etc. If I want to search for these Office 365 groups in SharePoint site, is it possible? Is there any content source available for this?

2 Answers 2

2

The webtemplate of a Modern team site is GROUP#0 and while that of a Communication site is SITEPAGEPUBLISHING#0. Both these modern sites are created as site collections in SharePoint.

Whenever, you build a Modern team site, it will also provision Outlook and planner etc behind the scenes and associate with the team site. So, you will be able to find them in SharePoint.

To list out all Modern team sites and Communication sites in SharePoint, go to any SharePoint page and add a Content Search Webpart or Search results webpart. Configure the query as below. Here,STS_Site will restrict search to find site collections only and then we specify the template type of site collections using the webtemplate managed property.

To search both Modern team sites and communication sites

{searchboxquery} contentclass:STS_Site webtemplate=SITEPAGEPUBLISHING webtemplate=GROUP

To search only Modern team sites(Office 365 group site)

{searchboxquery} contentclass:STS_Site webtemplate=GROUP
7
  • 1
    With the comment that Office 365 groups are only created for Modern team sites, and not for Communication sites. So if you're really interested in retrieving on those related to groups you might be getting out just with the GROUP web template Feb 9, 2018 at 12:46
  • @Gautam Sheth, that is good to know. So the contents what ever we added to the lists and libraries those also will be crawled right!
    – Mihir
    Feb 9, 2018 at 13:50
  • But actually I want to see the list of Office 365 groups even though I am not part of admin group from search query. Is it possible? I know there is a possibility to get in powershell, but this requires admin to get the details.
    – Mihir
    Feb 9, 2018 at 13:54
  • 1) Yes content will be crawled. 2) It works on search, so it will be permission trimmed by default. Using this search query, you will be able to list those office 365 group team sites to which you have access not necessarily all sites. However, if you want to list all sites, then you need admin access. Not possible to get all without admin access. Feb 9, 2018 at 15:15
  • hey @Mihir, could you please mark it as answer if it helped resolve your issue ? Cheers :) Feb 26, 2018 at 18:00
0

Note that with using webtemplate=GROUP you will get only those sites which are created together with O365 group. If old sites were groupified they won't be returned with this query because they will still have template originally used for creating them. For returning also groupified sites another query may be used:

{searchboxquery} contentclass:STS_Site GroupId<>""

GroupId is property bag property which exists in sites associated with O365 groups. More details can be found here: Fetch Sharepoint Online sites associated with O365 groups via Sharepoint Search KQL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.