public void getuserprofilesyncCustomattrib
        {
            SPSecurity.
            {
                using (SPSite siteCollection = new SPSite(MysitecollectionUrl))
                {
                    using (SPWeb site = siteCollection.OpenWeb())
                    {
                        ServerContext context = ServerContext.GetContext(
                        UserProfileManager profileManager = new UserProfileManager(context);
                        foreach (UserProfile profile in profileManager)
                        {
                            string PersonalSiteUrl = ((string)profile["
                            string AccountName = ((string)profile["AccountName"
                        }
                    }
                }
            });
        }
  public void getuserprofilesyncDefaultattri
        {
            SPSecurity.
            {
                using (SPSite site = new SPSite(MysitecollectionUrl))
                {
                    ServerContext context = ServerContext.GetContext(site)
                    UserProfileManager profileManager = new UserProfileManager(context);
                    foreach (UserProfile profile in profileManager)
                    {
                        string Department = Convert.ToString(profile[
                        string AccountName = Convert.ToString((profile[
                        string Name = Convert.ToString((profile[
                    }
                }
            });
        }
  
No comments:
Post a Comment