Monday, May 3, 2010

"Unknown user profile error..."

This was a particularly devilish problem that came to light last year.  Our team's information architect was updating his MySite in Sharepoint when he got this error.  He had no idea why it suddenly popped up.  He had been uploading a new picture to his profile when the error occured. 
Ok, it doesn't like the picture file for some reason, I'll just delete it.
Nope, it still gave him the error even after deleting the picture.  Now every save to the profile, no matter how small, threw the error. 
Something must have changed in the environment thats broken the MySite collections.

Wrong answer again.  No changes or updates had been applied to production in that week.  So what is going on here?  The short answer is that there is a bug i how Sharepoint handles some configurations of the Profile field properties.  That's a pretty general answer, but I'll break it down step-by-step.

If a property for a field is configured in the following manner:


'User can override security policy' (YES),
AND
'Do not allow user to make changes to this field'
AND
There is text in the field.

...the profile will not save correctly. What can mask this condition is if there is no content in a that field.  You may have those properties set on the profile that will cause the error, but until the user populates the field with content, no error will be thrown.  It took me several iterations of careful troubleshooting to figure this one out.  You can mitigate these errors by unchecking the 'User can override security policy' property.  Logically, you can see how the two properties in question can conflict with each other.  If the 'security policy' is a property of the field, but you don't allow users to make changes to the field, and you choose to let user's override it....well, you see the loop we're in now?

In our case, we have information importing from a Domino database that populates these fields.  So our information architect was filling out his information in his Lotus Notes address book, and 'causing' errors in Sharepoint.  Hope this helps anyone with similar problems.

No comments:

Post a Comment