Error adding or removing user from site collection – Invalid e-mail


We started getting an error when we tried to add or remove users from a site collection. It happened to the site collection permissions, to groups and even to the Site Collection Administrators group.

The error message was that “nice” unexpected error has occurred popup with a correlation ID and in some cases it also showed “[E-Mail] – [Invalid E-Mail]”.

We also noticed that only the farm account had access the Site Settings page. All the site collection administrators got access denied to the Site Settings page but they could access other administrative pages. We have several web applications running on the same SharePoint 2010 farm and this was the only one with this error. We checked the users properties and they all had an valid email on the email field on their profile.

When searching for the correlation ID on the ULS logs we could find the following error entries:

03/14/2012 10:52:19.45 w3wp.exe (0x1CB0) 0x26A4 SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (POST:http://%5BWEB APP URL]:80/_layouts/mngsiteadmin.aspx) e4745c89-75e6-4027-9890-d77cea3c814a
03/14/2012 10:52:19.47 w3wp.exe (0x1CB0) 0x26A4 SharePoint Foundation Logging Correlation Data xmnv Medium Site=/ e4745c89-75e6-4027-9890-d77cea3c814a
03/14/2012 10:52:19.95 w3wp.exe (0x1CB0) 0x26A4 SharePoint Foundation General 8kh7 High [E-Mail] – [Invalid E-Mail] e4745c89-75e6-4027-9890-d77cea3c814a
03/14/2012 10:52:20.75 w3wp.exe (0x1CB0) 0x26A4 SharePoint Foundation General 8kh7 High [E-Mail] – [Invalid E-Mail] e4745c89-75e6-4027-9890-d77cea3c814a
03/14/2012 10:52:20.75 w3wp.exe (0x1CB0) 0x26A4 SharePoint Foundation Runtime tkau Unexpected System.Runtime.InteropServices.COMException: [E-Mail] – [Invalid E-Mail] at Microsoft.SharePoint.Library.SPRequestInternalClass.UpdateMembers(String bstrUrl, UInt32 dwObjectType, String bstrObjId, Guid& pguidScopeId, Int32 lGroupID, Int32 lGroupOwnerId, Object& pvarArrayAdd, Object& pvarArrayAddIds, Object& pvarArrayLoginsRemove, Object& pvarArrayIdsRemove, Boolean bRemoveFromCurrentScopeOnly, Boolean bSendEmail) at Microsoft.SharePoint.Library.SPRequest.UpdateMembers(String bstrUrl, UInt32 dwObjectType, String bstrObjId, Guid& pguidScopeId, Int32 lGroupID, Int32 lGroupOwnerId, Object& pvarArrayAdd, Object& pvarArrayAddIds, Object& pvarArrayLoginsRemove, Object& pvarArrayIdsRemove, Boolean bRemoveFromCurrentScopeOnly, Boolean bSendEmail) e4745c89-75e6-4027-9890-d77cea3c814a

Nothing was very useful on the ULS logs and after searching on Google for a while we couldn’t find any reference to this error message. Then we decided to open a Microsoft support case.

Microsoft support was very responsive and called us back pretty quickly. After running several tests we found out that the issue was specific to one site collection. We then changed the ULS log level to verbose, restarted the SharePoint 2010 Tracing service on the web front end servers and repeated the add/remove user operations. One comment here: when you change the ULS log level to verbose the log files grow very fast, so right after the operations were done, we changed it back to our default level. Even doing this we still got 15 Mb log files.

The support engineer analyzed the log files and could tell us something was wrong with the content types for the site collection.

Checking the content types used on the lists for this site collection we found out the E-Mail site column has been edited to have validation applied and the error message for the validation was “Invalid E-Mail”. So we figured out  that SharePoint uses this same site column for the Email field on the User Information List and also use it directly or through the list for user authentication and user management on the site collection.  the add/remove operations and the login to the site were triggering the validation and throwing the error message. After removing the validation from the site column the site worked just fine.

We then came to 2 conclusions:

-The user permission assignment and the login processes use some of the site columns and try to validate the content types against the user information. We don’t understood why it happened but I don’t think it makes sense since .

-Never mess with the default SharePoint site columns because you never know how SharePoint uses them. They are not sample columns they created just to save you some time.

Thanks to the Microsoft Support Team for their efficiency and knowledge and thanks to @twlamb for your help on this debugging  task.

 

See you,

Amadeu.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: