UserExist() return’s false when email id is greater than 120 characters

So, In SharePoint 2010 when you have forms authentication enabled. You can register new users with email ids upto 250 characters as provisioned in User Profile Database at back end.

The problem occurs when you want to check if the user exists using SharePoint OOB function UserExist on ProfileManager class.

It Does not validates the user even after successful registration.
After 3 days of mind operation when I tried decompiling UserProfile.dll I found that the function calls another function GetGuid() which in turns call a Stored Procedure dbo.profile_GetUserGUID. And after checking the Stored Procedure definition it was found that the max limit of incoming account name is set to 120 characters.

Uffff… This is a MicroSoft SharePoint Bug.

Thanks

Advertisements