Today's Task: Find all memberships related to a specific user in SharePoint.
Still searching? I'll give you a hint… you cannot list all memberships related to a specific user in SharePoint. That's right. SharePoint does not have the capability to perform a simple look-up to list a user's memberships.
Initial Solution
After some searching, I could find only a few references to listing users memberships. The initial solution (scroll to end of post) was to run a SQL query directly from the database:
declare @RecordId int
select @RecordId = RecordId
from dbo.UserProfile_Full
where PreferredName = ‘<<preferred name here>>’
exec dbo.QuickLinksRetrieveAllItems @RecordId,@ViewerItemSecurity=31,@RequestedItemSecurity=16
Final Solution
Once again, I did some pondering and figured there must be a more elegant solution. I headed on over to CodePlex and after several searches finally came across a new project: MOSS Manage user membership feature
Not only can I now view all memberships of any user, but I can also manage them as well! I've tested out the feature in a couple of test environments and am extremely happy with the results. The following is a screen shot of the new application page in my MOSS virtual environment:
I'm still a bit amazed that this functionality isn't built-into SharePoint...
Enjoy!