Ömer Çelik

Yazılımcının Günlüğü

Sharepoint user properties isimlerini getirmek

using Microsoft.Office.Server;
using Microsoft.Office.Server.UserProfiles;
using (SPSite site = new SPSite("http://www.omercelik.com.tr"))
{
ServerContext context = ServerContext.GetContext(site);
UserProfileManager u_profmng =
new UserProfileManager(context);
PropertyCollection props = u_profmng.Properties;
foreach (Property prop in props)
{
Console.WriteLine(prop.Name.ToString());
}
}
Loading