How to exclude Public sites from SharePoint Online Tenant

%3CLINGO-SUB%20id%3D%22lingo-sub-2838220%22%20slang%3D%22en-US%22%3EHow%20to%20exclude%20Public%20sites%20from%20SharePoint%20Online%20Tenant%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2838220%22%20slang%3D%22en-US%22%3E%3CP%3EDear%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20a%20requirement%20to%20exclude%20the%20Public%20group%20sites%20in%20the%20SharePoint%20Online%20Tenant%20through%20search%20query%20text%20%3CU%3E(%2F_api%2Fsearch%2Fquery%3Fquerytext%3D'contentclass%3ASTS_Site%3C%2FU%3E)%3C%2FP%3E%3CP%3Eand%20display%20all%20other%20site%20collections.%20%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20tried%20to%20exclude%20it%20by%20adding%20%E2%80%98-WebTemplate%3AGROUP%E2%80%99%20but%20it%20is%20not%20displaying%20%E2%80%98private%20groups%E2%80%99%20too.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKindly%20share%20your%20suggestions%20if%20we%20can%20exclude%20the%20Public%20group%20sites%20from%20SP%20Online%20Tenant.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Yarliphani_0-1634050155734.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F316736iB518952C6F7B8FC2%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Yarliphani_0-1634050155734.png%22%20alt%3D%22Yarliphani_0-1634050155734.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EPhani%20Yarlagadda%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2838220%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

Dear All,

 

We have a requirement to exclude the Public group sites in the SharePoint Online Tenant through search query text (/_api/search/query?querytext='contentclass:STS_Site)

and display all other site collections.  

 

We have tried to exclude it by adding ‘-WebTemplate:GROUP’ but it is not displaying ‘private groups’ too.

 

Kindly share your suggestions if we can exclude the Public group sites from SP Online Tenant.

 

Yarliphani_0-1634050155734.png

 

Regards,

Phani Yarlagadda

0 Replies