I am querying the UserProfileManager using the GetChanges method which returns a collection of strongly typed collection of objects describing the changes to user profiles. The objects are derived from UserProfileChange and ProfileBaseChange classes. I am particularly looking for changes to Colleagues (UserProfileColleagueChange class).

I can retrieve the changes. However, I need the security and privacy setting applied to such a change object (remember, when adding a colleague, a user can select the visibility of this connection) ... the ProfileBaseChange has the information in a internal Property ItemSecurity. However, that is not surfaces in the public API.

How can I access that information? It's kinda useless if I can't access it.


Assuming that the information is absolutely not available anywhere else, you would need to use reflection as described here to access the internal property.

However please note that this is not supported by Microsoft and they may change the API in the future which may break your code. There is also a performance penalty.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.