MOSS2007 ProfiloUtente Proprietà: accesso programmatico a “attributo mappato” in AD

StackOverflow https://stackoverflow.com/questions/3103243

  •  29-09-2019
  •  | 
  •  

Domanda

Come forse sapete, MOSS 2007 funzionalità offerte per sincronizzare proprietà di Active Directory a SharePoint Proprietà UserProfile. È possibile mappare proprietà annuncio alle proprietà userprofile a Servizi Condivisi> Profilo utente e Proprietà> Visualizzazione delle proprietà di profilo (tutta la strada in fondo).

Al momento sto indagando la possibilità di modifiche Sincronizza UserProfiles Torna annuncio.

Sono nuovo di SharePoint e lottando la mia strada attraverso la sua API, ma quello che ho scavato fino ad oggi, è che si può iterare per UserProfile modifiche e scoprire timestamp, vecchi valori, nuovi valori, ecc.

    string siteUrl = @"http://[siteUrl]/";
    Microsoft.SharePoint.SPSite spsite = new Microsoft.SharePoint.SPSite(url);
    Microsoft.Office.Server.ServerContext serverContext = Microsoft.Office.Server.ServerContext.GetContext(spsite);
    Microsoft.Office.Server.UserProfiles.UserProfileManager userProfileMgr = new Microsoft.Office.Server.UserProfiles.UserProfileManager(serverContext);
    var collection = userProfileMgr.GetChanges();

    List<ProfilePropertyChange> changes = new List<ProfilePropertyChange>();
    foreach (Microsoft.Office.Server.UserProfiles.UserProfileChange change in collection)
    {
        if (change.ObjectType == Microsoft.Office.Server.UserProfiles.ObjectTypes.SingleValueProperty)
        {
            var singleValue = change as Microsoft.Office.Server.UserProfiles.UserProfileSingleValueChange;

        string oldValue = singleValue.OldValue;
        string newValue = singleValue.NewValue;
        var profileProperty = singleValue.ProfileProperty;
        DateTime modificationDate = singleValue.EventTime;

        ...

        }
    }

Tuttavia, quello che sto attualmente in grado di scoprire, è l'accesso programmatico al cosiddetto "attributo mappato" (il nome della proprietà originale in AD).

Qualcuno può punto me l'API di SharePoint che Reveale queste informazioni per me?

Molte grazie

È stato utile?

Soluzione

Steve Curran è stato così gentile da rispondere alla mia domanda sul forum di MSDN:

http: / /social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/019c1e60-babb-4942-90e1-d33e924c7c73

  

Uso della PropertyMapCollection voi   può essere in grado di cercare l'AD mappato   attributo dato il nome Userprofile.

     

DataSource ds = upcm.GetDataSource ();   PropertyMapCollection pmc =   ds.PropertyMapping;

     

http : //msdn.microsoft.com/en-us/library/microsoft.office.server.userprofiles.propertymapcollection%28office.12%29.aspx

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top