0
Fixed

Organization profile connector polling not possible

Adam van Vliet (Chief Information Security Officer) 8 years ago in UNIFYBroker/Microsoft SharePoint • updated by anonymous 3 years ago 6

Polling has had to be disable in the Organization Connector.

When OrganizationProfileManager.GetChanges(token); is called, the exception below is thrown.

This is due to the OrganizationProfileMembershipChange constructor containing a cast directly from an object to an int.

The code for polling is already written, only the interface on the connector was removed.

Check online sources, find a patch or raise an issue with Microsoft.

Specified cast is not valid.
   at Microsoft.Office.Server.UserProfiles.OrganizationProfileMembershipChange..ctor(ProfileManagerBase profileManager, SqlDataReader reader, Boolean loadProfile, ProfileBase profile)
   at Microsoft.Office.Server.UserProfiles.ProfileBase.GetOneChange(ProfileManagerBase profileManager, SqlDataReader sqlRecords, Boolean restrictToColleagueProperties, Boolean loadProfile, ProfileBase profile)
   at Microsoft.Office.Server.UserProfiles.ProfileBase.GetChanges(ProfileManagerBase profileManager, Int32 viewerRights, ProfileBaseChangeQuery changeQuery, Boolean restrictToColleagueChanges, Boolean fSortDescending, ProfileBase profile)
   at Microsoft.Office.Server.UserProfiles.ProfileBase.GetChanges(ProfileManagerBase profileManager, Int32 viewerRights, ProfileBaseChangeQuery changeQuery)
   at Microsoft.Office.Server.UserProfiles.OrganizationProfileManager.GetChanges(ProfileBaseChangeQuery changeQuery)
   at Microsoft.Office.Server.UserProfiles.OrganizationProfileManager.GetChanges(UserProfileChangeToken changeToken)
   at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.GetChangedOrganizationProfileIds(String oldChangeToken)
Affected Versions:
Fixed by Version:

Error still occurs with the ProfileBaseChangeQuery method for getting changes:

Error details:
System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Specified cast is not valid. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.InvalidCastException: Specified cast is not valid.
   at Microsoft.Office.Server.UserProfiles.OrganizationProfileMembershipChange..ctor(ProfileManagerBase profileManager, SqlDataReader reader, Boolean loadProfile, ProfileBase profile)
   at Microsoft.Office.Server.UserProfiles.ProfileBase.GetOneChange(ProfileManagerBase profileManager, SqlDataReader sqlRecords, Boolean restrictToColleagueProperties, Boolean loadProfile, ProfileBase profile)
   at Microsoft.Office.Server.UserProfiles.ProfileBase.GetChanges(ProfileManagerBase profileManager, Int32 viewerRights, ProfileBaseChangeQuery changeQuery, Boolean restrictToColleagueChanges, Boolean fSortDescending, ProfileBase profile)
   at Microsoft.Office.Server.UserProfiles.OrganizationProfileManager.GetChanges(ProfileBaseChangeQuery changeQuery)
   at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfil...)."

Currently waiting on April 2011 Cumulative Update to finish downloading. If the problem persists following this, an issue will need to be logged with Microsoft. The following posts suggest that the Organization Profile component of SharePoint 2010 is not yet finished, and this seems to be a component where this holds true. The documentation is also quite empty of information:

The same error still appears with a fully up-to-date SharePoint 2010. An issue will need to be logged.

The Connect site for SharePoint has since been taken down. As this has not been testing in some time for SharePoint, this will need to be checked with the latest updates. An issue can be posted to the Microsoft Partner forums for SharePoint at http://social.microsoft.com/Forums/en-US/partnerofficesharepoint/threads

Currently downloading the August 2012 rollup pack to confirm whether the functionality is now correct, or if the documentation should be updated.

Confirming with August 2012 CU and SP1, this method now works correctly. Added note to IDB-652, and marked as resolved. Adam, please confirm if this is appropriate.