Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

RunWithElevatedPrivileges to enumerate user profiles on application

  Asked By: Garrett    Date: Jul 17    Category: Sharepoint    Views: 1613

I need to enumerate user profiles from an application page
(_layouts\Custom\MyApplicationPage.aspx). The "current user" does not have
access to manage user profiles (Shared Services personalization settings), so I
attempted to use the RunWithElevatedPrivileges method. This, however, does not
elevate to the application pool account; instead it elevates to the
SHAREPOINT\system account. I cannot physically give SHAREPOINT\system access to
"Manage User Profiles" permission in the SSP. Anyone run across this before?
Any elegant way to handle this scenario?



1 Answer Found

Answer #1    Answered By: Emmett Hyde     Answered On: Jul 17

Nevermind. Having one of my "stupid" days (this one is near the top).

My requirement was to get a specific user  profile. All I needed to do was call
ProfileManager.GetUserProfile, rather than enumerating using a foreach.
GetUserProfile does not require elevated privileges.