Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The following code snippets will get the user profiles properties both OOB and Custom:
Profiles.UserProfileService UPS = new Profiles.UserProfileService();
UPS.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
UPS.PreAuthenticate = true;
PropertyData custom = UPS.GetUserPropertyByAccountName("domain\\FirstName.LastName", "CustomID");
string val = Custom.Values[0].Value.ToString();