1

ご存知かもしれませんが、MOSS 2007 には、Active Directory プロパティを SharePoint UserProfile プロパティに同期する機能があります。[Shared Services] > [User Profile and Properties] > [View Profile properties] (一番下) で、AD プロパティを userProfile プロパティにマップできます。

現在、userProfiles の変更を AD に同期する可能性を調査しています。

私は SharePoint を初めて使用し、その API を使用するのに苦労していますが、これまでに掘り下げたのは、UserProfile の変更を反復処理して、タイムスタンプ、古い値、新しい値などを見つけることができるということです.

    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;

        ...

        }
    }

ただし、現在発見できないのは、いわゆる「マップされた属性」(AD の元のプロパティ名) へのプログラムによるアクセスです。

この情報を明らかにしてくれる SharePoint API を教えてくれる人はいますか?

どうもありがとう

4

1 に答える 1

1

Steve Curran は親切にも、MSDN フォーラムで私の質問に答えてくれました。

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

PropertyMapCollection を使用すると、Userprofile 名を指定して、マップされた AD 属性を検索できる場合があります。

データソース ds = upcm.GetDataSource(); PropertyMapCollection pmc = ds.PropertyMapping;

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

于 2010-07-01T12:28:37.537 に答える