Goal
As the error metions the user should be "Admin in User Profile Service". The error comes when a user try to update a profile(other user's profile). Please read my last blog for more clarification
SharePoint 2010 - Update user's infomation using UserProfileManager programmatically.
Fix
- SharePoint 2010 Central Administration
- Application Management > Manage Service Applications
- Select the "User Profile Service Application" tab. On the top you can find an option of "Administrators".
- Apply the user you are using in the Administrators and give rights to the user. I am using "Administrator" as a user.
Let me know if this is helpfull.
Not helpful, running my code in a RunWithElevatedPrivileges block, loaded SPSite and Context and UserProfileManager objects inside this block, added the system account with full control as you described, and still the same error.
ReplyDeleteHello There,
DeleteSorry it was not helpful to you, but the example posted is totally tried and tested. :(
Thanks,
Maulik Dhorajia
Yes it not works in my case too.
ReplyDeleteIt WORKS!!!!!
ReplyDeleteIt's wrong code
ReplyDelete