Tag Archives: UPS

SharePoint 2010: Unable to edit user properties

The other day I received a support case where customer complained that they “suddenly” lost ability to edit user properties in SharePoint 2010. As usual picture worth thousand works so the problem was that if you navigate to Site Actions > Site Permissions, locate some user and click on your user name you will be presented with user information page and if you click edit you will see this:

Sort of interesting Edit Personal Settings dialog where it is not possible to edit anything…

But it used to look like that:

You see more properties listed and they are editable. Now having that description you have to be really skillful with art of googling to get to the bottom of this in the form of some blog post similar to this one. Because to do a proper Google search (one which yields a solution) you have to employ the right terms/know the nature of this issue. But if you noticed word suddenly in quotes in the very beginning I had a background information on preceding changes which caused this “sudden” issue hence was able to fix it. I will go into detailed explanation below for the sake of knowledge sharing.

First of all 1st screenshot is normal for environments where UPS is up and running – as soon as you configure it, SharePoint assumes that all property modifications are being performed on AD DS side and synced from there on a regular basis by UPS. Once UPS is provisioned SP 2010 hides/modifies default forms (layouts/userdisp.aspx – the one where you may click Edit Item to change your properties on the _layouts/useredit.aspx form) and instead of them for users whose profiles are synced you supposed to see specific user profile page instead, which will look approximately like this:

If it does not shown and you see the same uneditable edit form as on the first screenshot, then it either means that UPA is not configured completely or user profile is not synced yet (are you sure that user in question is in right OU?)

So essentially first screenshot/problem shows us that UPS was partially configured/profile(s) not synced (as we still not getting user profile page) but default forms already modified in the process of UPS installation, because when you provision a UPA it will set the fields in hidden site user info list to read only and hidden. With this knowledge about the nature of the problem you may google for the right scripts/information.

In my case we worked on environment where UPS was failing to start/work properly (one of these cases where you need delve deeper into configuration of UPS and peruse something like this blog post) hence it was just mandatory to restore ability to edit user properties. And for that you just need to use the script below against your SP web app (grab this script on GitHub).

# Load SharePoint PS Module (if not already loaded)
# You only need this section if you want to run this script from PS ISE / outside of SP Management Shell
$ver = $host | select version
if ($ver.Version.Major -gt 1) {$host.Runspace.ThreadOptions = "ReuseThread"} 
if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) 
{
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}

# Tested with SharePoint 2010
# Restores editable user fields after UPA provisioning
$web = Get-SPWeb http://intranet.contoso.com/
$names = "Title", "EMail", "MobilePhone", "Notes", "SipAddress", "Picture", "Department", "JobTitle"
foreach( $name in $names )
{
$f = $web.SiteUserInfoList.Fields.GetFieldByInternalName($name);
$f.Hidden = $false
$f.ReadOnlyField = $false
$f.Update()
}

Once this script completes you will get your editable user properties back. Two potential problems you may have with this:
1) If Get-SPWeb part of the script complains about incompatibility saying something like “Microsoft SharePoint is not supported with version 4.0.30319.34014” just run new PS instance using -version 2.0 switch;
2) If script completes successfully but you getting user profile page instead of your old beloved form – delete user profile and try again (in case you are not keen or fully removing UPA).

And one last note with regards how we run into this in my specific support case. Client was using K2 and they lived quite happily without UPS provisioned in their SharePoint environment which is a bit strange as a UPS is a requirement for K2. But after upgrading to 4.6.11 the very strange issue crop up which had a bit obscure symptoms on the surface, but in the end was isolated to the fact that each time GetUserGroups URM call was performed to the SharePoint provider no SharePoint groups of which this user is direct member were returned. On the surface it looked like random losing of user’s group membership information and randomly failed K2 tasks which were assigned to SharePoint groups. Randomness stemmed from the fact that GetGroupUsers URM call returned all users for the same group just fine.

And knowing that sometimes it is difficult to find where it was told that XYZ is requirement for K2, I’ll clarify this for UPS specifically: you can find it in K2 blackpearl Installation and Configuration Guide > Prerequisites > Environment Configuration > SharePoint Server 2010 User Profile Service set up

“The SharePoint User Profile Service on any non SharePoint Foundation version must be set up correctly for the Identity Services Group Providers to function correctly with regards to User, Group and Membership resolution. It must be correctly populated with the user’s information and the service must be started.”

Posting rather a lot about SharePoint 2010 at the time of 2016 and cloud stuff I rather feel like author of The Old New Thing blog who at some point decided to blog about old stuff as there is less competition there – everybody busy blogging about new and shiny things (though I should admit I don’t go into really low level details as that blog does) 🙂 But I hope these posts may still be useful for someone.

Please follow and like us:

Running VMware Workstation VMs from NAS

As I moved most of my VMs to NAS, I should admit that whereas it is best solution in terms of providing adequate space for bulky VMs and snapshots and access convenience, you pay for it with decreased performance (at least if you compare it with running VMs off internal SATA 3 SSDs). Latter can be mitigated if you use NAS with good performance and configure it with array of disks, even if it won’t be on pair with SSD but it can be good enough (you also can leverage SSD drives for caching in certain NAS models, but this seems to be an extra possible point of failure in your setup). But what can not be mitigated with NAS it is high price tag for it, as not only you have to pay for NAS device and number of NAS optimized drives, you have to think about extra switch ports and UPS, both for NAS and your network equipment (provided that you use laptop as your VMs host you don’t need UPS for it at least :))

Maybe you can get away with clicking Retry button in response to I/O error you receive from your VM due to intermittent loss of network connectivity, but not always. For example today I was in process ob building K2 4.6.9 VM, going through update procedure of 4.6.7 and my switch went down for 30 seconds, but I was able to continue running my VM by clicking on Retry in response to I/O error message from my VM running from NAS. But the thing is that when I finished the process and decided to take a snapshot to save my work I got this:

VMWareWorkstation_NAS_disconnect_consequences

Next, as at times Suspend/Resume procedure is able to “solve” minor issues (sort of), I tried this also, but VM just vent into hard restart. After that I won’t be able to power it on again with the following error:

VMWareWorkstation_VM_appears_to_be_in_use

Solution to this in cases when you are sure that your VM is not running is to delete any *.lck files in VM directory and try again.

So power loss on your switch and consequent connectivity loss even for 30 seconds or so may lead to quite harsh / unpleasant situation (think of situation when you continue to do your work to discover that your VM fails only when you decide to take a snapshot). So when you plan for running VMs from NAS budget for UPS to protect your setup for connectivity and/or data loss.

Please follow and like us: