I want to list all the sites in a web application for the user where the user is either a member or admin (not visitor).

I definitely do not want to iterate through the sites. All the other options of using SiteMap or Search will return all the sites where user have some kind of access. I am currently looking at how membership web parts work in MySite.

How to proceed?

  • if you don't want iterate through all the sites you have to create a custom code. Do you want that with Powershell, Server side code or client side code? – Salvatore Di Fazio Mar 20 '13 at 9:52
  • Since this will be used in a webpart it can either be a server or a client side code. – Sharath Chandra Mar 20 '13 at 11:34
  • how many users do you have? – Salvatore Di Fazio Mar 20 '13 at 15:00
  • Well currently there are more than 30000 users added through Active Directory groups – Sharath Chandra Mar 21 '13 at 6:19

You can use a Core Results Search Web Part and hard code the following query to only bring back sites. Then you can customize the XSLT to get it to look how you want.

contentclass:STS_Site contentclass:STS_Web contentClass:sts_listitem_850


  • Will this not return be all the sites where I have access? I want to the sites where the user is either member or owner, but not a visitor. In our current case the user will have visitor permissions on all most all the sites. – Sharath Chandra Mar 21 '13 at 6:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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