Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7682993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:41:41+00:00 2026-05-31T18:41:41+00:00

I am trying to update a sharepoint 2010 users profile and I keep getting

  • 0

I am trying to update a sharepoint 2010 users profile and I keep getting this error:

Microsoft.Office.Server.UserProfiles.PropertyNotEditableException: Property Not
Editable: This property can only be modified by an administrator. 
at Microsoft.Office.Server.UserProfiles.UserProfileValueCollection.
CheckUpdatePermissions()

I’m updating AD first with a separate block of code (which works). We are using the profile sync service so the value does eventually propagate down but we’d like to update the SP profile at the same time to show the change immediately.

code:

using (System.Web.Hosting.HostingEnvironment.Impersonate())
{
  SPSecurity.RunWithElevatedPrivileges(delegate()
  {
    Response.Write(System.Security.Principal.WindowsIdentity.GetCurrent().Name);
    using (var site = new SPSite(SPContext.Current.Site.ID))
    {
        try
        {
            SPServiceContext sc = SPServiceContext.GetContext(site);
            UserProfileManager userProfileMangager = new UserProfileManager(sc);
            SPUser user = site.RootWeb.EnsureUser(loginName);
            UserProfile profile = userProfileMangager.GetUserProfile(loginName);
                try
                {
                    profile["WorkEmail"].Value = tbEmail.Text;
                    profile["WorkPhone"].Value = tbPhone.Text;
                    profile["company"].Value = tbCompany.Text;
                    profile.Commit();
                }
                catch (Exception ex)
                {
                    lblMesssage.Text = ex.ToString() + "<br/>";
                    lblMesssage.Visible = true;
                }
        }
        catch (Exception ex)
        {
            lblMesssage.Text = ex.ToString();
            lblMesssage.Visible = true;
        }
  }
});
panComplete.Visible = true;
panForm.Visible = false;
waiting.Visible = false;
litSuccess.Visible = true;
}

couple of those things are in there as I’ve searched around and tried different things. Suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T18:41:42+00:00Added an answer on May 31, 2026 at 6:41 pm

    What we are doing at this point is writing to the hidden SP user profile list to spoof it until the AD sync takes place. This is not really the best answer but it’s the only one I found so far. I’ll happily accept a better answer if one comes.

    SPSecurity.RunWithElevatedPrivileges(() =>
                         {
                             using (var site = new SPSite(CurrentWeb.Site.Url))
                             {
                                 using (var web = site.OpenWeb(CurrentWeb.ID))
                                 {
                                     web.AllowUnsafeUpdates = true;
                                     SPList userInfo = web.Site.RootWeb.Lists["User Information List"];
                                     SPListItem userItem = userInfo.Items.GetItemById(_SelectedUser.ID);
                                     userItem["Work phone"] = tbPhone.Text;
                                     userItem["Work e-mail"] = tbEmail.Text;
                                     userItem["company"] = tbCompany.Text;
                                     userItem.Update();
                                 }
                             }
                         });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In sharepoint when trying to update a list I am getting the error: 0x81020014One
I'm trying to update a hashtable in a loop but getting an error: System.InvalidOperationException:
While trying to update my Android SDK I am encountering this error when trying
I am playing around with a SharePoint server and I am trying to programmatically
I am trying to insert new ListItems in a Sharepoint 2010 List already created.
I have just started using Sharepoint Foundation 2010 and I'm trying to write a
I'm trying to save a file to a Sharepoint server using JAX-WS. The web
Hi im trying to update a single field in the database and keep the
am trying to update my database table that looks like this name | file_name
I am trying update text views while this loop is processing. Here is my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.