0
Fixed

Organization profile connector hindered by read-only nature of record IDs

Matthew Clark 13 years ago in UNIFYBroker/Microsoft SharePoint updated by anonymous 9 years ago 37

It appears the organization profile connector currently only works in environments where OUs are added sequentially with sequential IDs.

SharePoint has a “RecordId” field which is a unique identifier for an organization profile. This is also used to manage the hierarchy, with organization profiles having a parent property which contains the RecordId of the parent. However, this field is readonly in SharePoint, meaning that we have no control over its value, and to ensure the hierarchy is correct, the parent values would need to be updated for the organization profiles after an initial export. Currently, the mapping is only correct if SharePoint happens to generate an ID which is the same as the one from the source system.

The connector must be revisited to handle this behaviour.

Current work is around testing the addition of two fields to SharePoint and the FIM metaverse for handling this mapping as follows, making use of the export control of reference values. From an earlier email:

The issue of course here is that the record ID is not known prior to the creation of the organization in SharePoint, and a two-pass approach is required. However, if the field was configured as a reference instead you could assume that you would have already exported the parent and have its correct SharePoint ID, meaning you wouldn’t have to do all your adds and then all your updates on a second FIM export. This would, however, mean that the solution would need to configure the hierarchy as a reference (if it hadn’t already). In order for joins to work successfully, we’ll likely need to flow this information back into the MA.


AdapterEngine.extensibility.config.xml
ConnectorEngine.extensibility.config.xml
Conversation with Adam van Vliet Matthew Clark.msg
IDBSP-44 - Attribute Flows in SharePoint Org MA.png
orgDb.png
Unify.Connectors.SharePoint.SharePoint2010WCFService.wsp
Unify.Connectors.SharePoint.SharePoint2010WCFService.wsp
Unify.Connectors.SharePoint.SharePoint2010WCFService.wsp
Unify.Connectors.SharePoint.SharePoint2010WCFService.wsp

Attached adapter and connector engine config from demo machine for Richard. Screenshot attached of FIM flows for test MA

New development release uploaded to https://unifysolutions.jira.com/wiki/display/SUBIDBSP/Downloads for Richard to confirm functionality.

Assigned to Richard for feedback

The null exception discussed on skype the other day is still appearing whenever I attempt to import organisations.

The error is

20120229,02:59:44,Get all entities from connector failed.,Connector,Warning,"Get all entities from connector SharePoint Connector failed with reason Object reference not set to an instance of an object.. Duration: 00:00:00.0500300
Error details:
System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Object reference not set to an instance of an object. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.<>c__DisplayClass4.<GetOrganizationProfilePage>b__3()
   at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010ProfileServiceBase.TryElevate(CodeToRunElevated codeToRunElevated)
   at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.GetOrganizationProfilePage(Int64 skip, Int32 take)
   at SyncInvokeGetOrganizationProfilePage(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatc...).",Normal
20120229,02:59:44,Change detection engine import all items failed.,Change detection engine,Warning,"Change detection engine import all items for connector SharePoint Connector failed with reason Object reference not set to an instance of an object.. Duration: 00:00:00.1290774
Error details:
System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Object reference not set to an instance of an object. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.<>c__DisplayClass4.<GetOrganizationProfilePage>b__3()
   at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010ProfileServiceBase.TryElevate(CodeToRunElevated codeToRunElevated)
   at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.GetOrganizationProfilePage(Int64 skip, Int32 take)
   at SyncInvokeGetOrganizationProfilePage(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatc...).",Normal

I have tested this on my previous VM, an early snapshot of that VM and now a fresh install of Windows, SQL Server and SharePoint and all systems have encountered the same error. (The updated WSP is installed)

As far as configuratiom, Sharepoint is a base install with the exception being I added the AD admin to the users list. That said, the local admin of that system has also been tested and had the same error.

Besides that I've added the attribute 'IdMProfileReference' to the organisation schema with a type string (as per the connector configuration above).

Additionally I have tested the schema discovery plugin in identity broker and that functions fine, I can retrieve the organisations schema, and also tested using the generated code to perform an import before receiving this same error.

Lastly, the user profile search still functions, I have a single administrator user that is returned.

I'm going through the event viewer and can find no issues on the SharePoint system...the Security Audits are shown as being successful and theres no errors I can see to indicate anything going wrong on the SharePoint server. I'll continue to investigate.

This may be relevant, but the configuration is as follows

System1:
AD/Domain Controller

System 2:
IDM Products (FIM, IDentity Broker)
Idm SQL Server instance

System 3:
SharePoint Server (installed using a local admin account, with the domain admin granted access via the administrative interface after install)
Sharepoint SQL Server instance

I am having a look at the wcf service, but it certainly appears that the SharePoint API is returning the wrong thing (as discussed the other day).

Please have a look through the SharePoint logs (I think they are in c:\Program Files\Common Files\Microsoft Shared\web server extensions\14\LOGS).

I will keep looking on my end, and I'll let you know if I find anything.

Recent entries included. See below for the bit of interest where a request did fail. I'll need to look into that further.

02/29/2012 15:02:18.33 w3wp.exe (0x1638) 0x0A28 SharePoint Foundation Monitoring nasq Medium Entering monitored scope (Request (POST:http://sharepoint:80/_vti_bin/UNIFY/OrganizationProfile.svc))
02/29/2012 15:02:18.33 w3wp.exe (0x1638) 0x0A28 SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (POST:http://sharepoint:80/_vti_bin/UNIFY/OrganizationProfile.svc) c188d35f-c3e9-472c-91eb-29d22073b4c6
02/29/2012 15:02:18.33 w3wp.exe (0x1638) 0x0A28 SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (Request (POST:http://sharepoint:80/_vti_bin/UNIFY/OrganizationProfile.svc)). Execution Time=1.68904148432273 c188d35f-c3e9-472c-91eb-29d22073b4c6
02/29/2012 15:02:18.34 w3wp.exe (0x1638) 0x159C SharePoint Foundation Monitoring nasq Medium Entering monitored scope (Request (POST:http://sharepoint:80/_vti_bin/UNIFY/OrganizationProfile.svc))
02/29/2012 15:02:18.34 w3wp.exe (0x1638) 0x159C SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (POST:http://sharepoint:80/_vti_bin/UNIFY/OrganizationProfile.svc) 62229b14-b4dc-4d0e-9b8a-4dd0133a8457
02/29/2012 15:02:18.34 w3wp.exe (0x1638) 0x159C SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (Request (POST:http://sharepoint:80/_vti_bin/UNIFY/OrganizationProfile.svc)). Execution Time=0.848711218883964 62229b14-b4dc-4d0e-9b8a-4dd0133a8457
02/29/2012 15:02:18.34 w3wp.exe (0x1638) 0x0A28 SharePoint Foundation Monitoring nasq Medium Entering monitored scope (Request (POST:http://sharepoint:80/_vti_bin/UNIFY/OrganizationProfile.svc))
02/29/2012 15:02:18.34 w3wp.exe (0x1638) 0x0A28 SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (POST:http://sharepoint:80/_vti_bin/UNIFY/OrganizationProfile.svc) 33f6f0ec-4419-4d98-bafe-a1a74e81d27c
02/29/2012 15:02:18.35 w3wp.exe (0x1638) 0x159C SharePoint Foundation Topology e5mc Medium WcfSendRequest: RemoteAddress: 'http://sharepoint:32843/1c240328f26e452ba319b84cafa9ab53/ProfilePropertyService.svc' Channel: 'Microsoft.Office.Server.UserProfiles.IProfilePropertyService' Action: 'http://Microsoft.Office.Server.UserProfiles/GetProfileProperties' MessageId: 'urn:uuid:f6ccd30d-176b-46ca-935c-7e8e1aeee669'
02/29/2012 15:02:18.36 w3wp.exe (0x0C18) 0x0840 SharePoint Foundation Topology e5mb Medium WcfReceiveRequest: LocalAddress: 'http://sharepoint.fim.local:32843/1c240328f26e452ba319b84cafa9ab53/ProfilePropertyService.svc' Channel: 'System.ServiceModel.Channels.ServiceChannel' Action: 'http://Microsoft.Office.Server.UserProfiles/GetProfileProperties' MessageId: 'urn:uuid:f6ccd30d-176b-46ca-935c-7e8e1aeee669' 707a4590-bc1c-4925-b135-aeaddf9ae71e
02/29/2012 15:02:18.36 w3wp.exe (0x0C18) 0x0840 SharePoint Foundation Monitoring nasq Medium Entering monitored scope (ExecuteWcfServerOperation) 707a4590-bc1c-4925-b135-aeaddf9ae71e
02/29/2012 15:02:18.36 w3wp.exe (0x0C18) 0x0840 SharePoint Foundation General 8kh7 High Cannot complete this action. Please try again. 707a4590-bc1c-4925-b135-aeaddf9ae71e
02/29/2012 15:02:18.60 w3wp.exe (0x1638) 0x0A28 SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (Request (POST:http://sharepoint:80/_vti_bin/UNIFY/OrganizationProfile.svc)). Execution Time=266.100998869968 33f6f0ec-4419-4d98-bafe-a1a74e81d27c
02/29/2012 15:02:18.61 w3wp.exe (0x1638) 0x0A28 SharePoint Foundation Monitoring nasq Medium Entering monitored scope (Request (POST:http://sharepoint:80/_vti_bin/UNIFY/OrganizationProfile.svc))
02/29/2012 15:02:18.61 w3wp.exe (0x1638) 0x0A28 SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (POST:http://sharepoint:80/_vti_bin/UNIFY/OrganizationProfile.svc) 36dac3b7-827b-4b26-a88d-2315ca52e9ba
02/29/2012 15:02:18.80 w3wp.exe (0x0C18) 0x0840 SharePoint Foundation General 8kh7 High Cannot complete this action. Please try again. 707a4590-bc1c-4925-b135-aeaddf9ae71e
02/29/2012 15:02:18.82 w3wp.exe (0x0C18) 0x0840 SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (ExecuteWcfServerOperation). Execution Time=461.65378560683 707a4590-bc1c-4925-b135-aeaddf9ae71e
02/29/2012 15:02:18.82 w3wp.exe (0x1638) 0x159C SharePoint Foundation Monitoring b4ly High Leaving Monitored Scope (ExecuteWcfOperation:http://Microsoft.Office.Server.UserProfiles/GetProfileProperties). Execution Time=470.547094672647
02/29/2012 15:02:18.82 w3wp.exe (0x1638) 0x159C SharePoint Foundation Monitoring b4ly High Leaving Monitored Scope (ExecuteOnChannel:GetProfileProperties). Execution Time=471.763031334988
02/29/2012 15:02:19.12 w3wp.exe (0x1638) 0x0A28 SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (Request (POST:http://sharepoint:80/_vti_bin/UNIFY/OrganizationProfile.svc)). Execution Time=515.54597022806 36dac3b7-827b-4b26-a88d-2315ca52e9ba
02/29/2012 15:02:19.36 mssearch.exe (0x05C0) 0x0874 SharePoint Foundation Search IDXPIPlugin e1jo High 8b9 Se a master merge has completed resman.cxx:5208 d:\office\source\search\native\ytrip\tripoli\cindex\resman.cxx
02/29/2012 15:02:19.47 mssearch.exe (0x05C0) 0x0874 SharePoint Foundation Search Content Index Server dx9h Information Component: 8b9fb6eb-cc5a-4dd7-907e-b3fb553bb89d A master merge has completed for catalog Search.
02/29/2012 15:02:23.53 w3wp.exe (0x0E88) 0x0EF8 SharePoint Foundation Topology e5mc Medium WcfSendRequest: RemoteAddress: 'http://sharepoint:32843/c4205cfbd9a6480395036e438a845c80/MetadataWebService.svc' Channel: 'Microsoft.SharePoint.Taxonomy.IMetadataWebServiceApplication' Action: 'http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadOnly/GetChanges' MessageId: 'urn:uuid:23f66646-47cb-41a6-b801-82b6f133f648'
02/29/2012 15:02:23.54 w3wp.exe (0x0C18) 0x0840 SharePoint Foundation Topology e5mb Medium WcfReceiveRequest: LocalAddress: 'http://sharepoint.fim.local:32843/c4205cfbd9a6480395036e438a845c80/MetadataWebService.svc' Channel: 'System.ServiceModel.Channels.ServiceChannel' Action: 'http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadOnly/GetChanges' MessageId: 'urn:uuid:23f66646-47cb-41a6-b801-82b6f133f648' 5de8fcba-45de-4fe4-8184-75d08cdfc0b1
02/29/2012 15:02:23.54 w3wp.exe (0x0C18) 0x0840 SharePoint Foundation Monitoring nasq Medium Entering monitored scope (ExecuteWcfServerOperation) 5de8fcba-45de-4fe4-8184-75d08cdfc0b1
02/29/2012 15:02:23.54 w3wp.exe (0x0C18) 0x0840 SharePoint Server Taxonomy fuc5 Medium MetadataWebServiceApplication.GetChanges called on 'Managed Metadata Service' starting. 5de8fcba-45de-4fe4-8184-75d08cdfc0b1
02/29/2012 15:02:23.54 w3wp.exe (0x0C18) 0x0840 SharePoint Server Taxonomy fuc6 Medium MetadataWebServiceApplication.GetChanges called on 'Managed Metadata Service' completed. 5de8fcba-45de-4fe4-8184-75d08cdfc0b1
02/29/2012 15:02:23.54 w3wp.exe (0x0C18) 0x0840 SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (ExecuteWcfServerOperation). Execution Time=2.39171458942407 5de8fcba-45de-4fe4-8184-75d08cdfc0b1
02/29/2012 15:02:24.28 w3wp.exe (0x1638) 0x149C SharePoint Foundation Topology e5mc Medium WcfSendRequest: RemoteAddress: 'http://sharepoint:32843/c4205cfbd9a6480395036e438a845c80/MetadataWebService.svc' Channel: 'Microsoft.SharePoint.Taxonomy.IMetadataWebServiceApplication' Action: 'http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadOnly/GetChanges' MessageId: 'urn:uuid:e0775a69-aa28-423e-a5bd-290273d0a8cc'
02/29/2012 15:02:24.29 w3wp.exe (0x0C18) 0x0448 SharePoint Foundation Topology e5mb Medium WcfReceiveRequest: LocalAddress: 'http://sharepoint.fim.local:32843/c4205cfbd9a6480395036e438a845c80/MetadataWebService.svc' Channel: 'System.ServiceModel.Channels.ServiceChannel' Action: 'http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadOnly/GetChanges' MessageId: 'urn:uuid:e0775a69-aa28-423e-a5bd-290273d0a8cc' 0be922d0-cc09-4377-8cd2-ff129edc3816
02/29/2012 15:02:24.29 w3wp.exe (0x0C18) 0x0448 SharePoint Foundation Monitoring nasq Medium Entering monitored scope (ExecuteWcfServerOperation) 0be922d0-cc09-4377-8cd2-ff129edc3816
02/29/2012 15:02:24.29 w3wp.exe (0x0C18) 0x0448 SharePoint Server Taxonomy fuc5 Medium MetadataWebServiceApplication.GetChanges called on 'Managed Metadata Service' starting. 0be922d0-cc09-4377-8cd2-ff129edc3816
02/29/2012 15:02:24.29 w3wp.exe (0x0C18) 0x0448 SharePoint Server Taxonomy fuc6 Medium MetadataWebServiceApplication.GetChanges called on 'Managed Metadata Service' completed. 0be922d0-cc09-4377-8cd2-ff129edc3816
02/29/2012 15:02:24.29 w3wp.exe (0x0C18) 0x0448 SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (ExecuteWcfServerOperation). Execution Time=1.53308590896329 0be922d0-cc09-4377-8cd2-ff129edc3816
02/29/2012 15:02:30.59 OWSTIMER.EXE (0x07E8) 0x0B80 SharePoint Foundation Monitoring nasq Medium Entering monitored scope (Timer Job job-application-server) f084ed24-10ba-482a-ac73-0c524ce96e46
02/29/2012 15:02:30.59 OWSTIMER.EXE (0x07E8) 0x0B80 SharePoint Server Search Administration dkd5 High synchronizing search service instance f084ed24-10ba-482a-ac73-0c524ce96e46
02/29/2012 15:02:30.59 OWSTIMER.EXE (0x07E8) 0x0B80 SharePoint Server Search Administration eff0 High synchronizing search data access service instance f084ed24-10ba-482a-ac73-0c524ce96e46

going to look into the meaning ot

02/29/2012 15:02:18.61 w3wp.exe (0x1638) 0x0A28 SharePoint Foundation Monitoring nasq Medium Entering monitored scope (Request (POST:http://sharepoint:80/_vti_bin/UNIFY/OrganizationProfile.svc))
02/29/2012 15:02:18.61 w3wp.exe (0x1638) 0x0A28 SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (POST:http://sharepoint:80/_vti_bin/UNIFY/OrganizationProfile.svc) 36dac3b7-827b-4b26-a88d-2315ca52e9ba
02/29/2012 15:02:18.80 w3wp.exe (0x0C18) 0x0840 SharePoint Foundation General 8kh7 High Cannot complete this action. Please try again. 707a4590-bc1c-4925-b135-aeaddf9ae71e
02/29/2012 15:02:18.82 w3wp.exe (0x0C18) 0x0840 SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (ExecuteWcfServerOperation). Execution Time=461.65378560683 707a4590-bc1c-4925-b135-aeaddf9ae71e

Richard, with the fresh install of SP, did you start fresh, with a fresh database?

Have you ever had it work? As the part that is failing hasn't been changed since it was released as a candidate.

It is a fresh database.

The existing VM, which I blew away as I didn't have space for it if I was going to try a fresh one, worked for a period minus the issue that I couldn't set the RecordID. I havent tested this VM with the older release, only the dev copy Matt provided. I'm currently looked at IIS and anything else that may cause issues security wise, nothing has come up yet but I'll continue to investigate.

From IIS Logs. A User full import followed by an organisation full import

2012-02-29 04:46:49 192.168.0.136 POST /_vti_bin/unify/userprofile.svc - 80 - 192.168.0.130 - 401 2 5 3
2012-02-29 04:46:49 192.168.0.136 POST /_vti_bin/unify/userprofile.svc - 80 - 192.168.0.130 - 401 1 2148074254 2
2012-02-29 04:46:51 192.168.0.136 POST /_vti_bin/unify/userprofile.svc/ntlm - 80 FIM\Administrator 192.168.0.130 - 200 0 0 1200
2012-02-29 04:46:52 192.168.0.136 POST /_vti_bin/unify/userprofile.svc/ntlm - 80 FIM\Administrator 192.168.0.130 - 200 0 0 1057
2012-02-29 04:46:52 192.168.0.136 POST /_vti_bin/unify/userprofile.svc/ntlm - 80 FIM\Administrator 192.168.0.130 - 200 0 0 307
2012-02-29 04:47:58 192.168.0.136 POST /_vti_bin/UNIFY/OrganizationProfile.svc - 80 - 192.168.0.130 - 401 2 5 3
2012-02-29 04:47:58 192.168.0.136 POST /_vti_bin/UNIFY/OrganizationProfile.svc - 80 - 192.168.0.130 - 401 1 2148074254 1
2012-02-29 04:47:58 192.168.0.136 POST /_vti_bin/unify/organizationprofile.svc/ntlm - 80 FIM\Administrator 192.168.0.130 - 200 0 0 16
2012-02-29 04:47:58 192.168.0.136 POST /_vti_bin/unify/organizationprofile.svc/ntlm - 80 FIM\Administrator 192.168.0.130 - 500 0 0 77

I take it that the final line there is a HTTP 500 error, eg Internal Server Error

Were you able to add WCF trace to the SharePoint service?

Attached Unify.Connectors.SharePoint.SharePoint2010WCFService.wsp.

Richard, this is a test version that will hopefully tell us which object is causing the problem.

Thanks.

Hi, I've installed that component. How do I go about using it.

And for the previous response, I hadn't enabled tracing at that time, looking into it now

Just as before, it just checks if a few key objects are null and if they are the exception will tell us which one.

Great, thanks.

20120229,06:28:21,Logging Engine,Logging Engine,Information,Log file started.,Minimal
20120229,06:28:21,Change detection engine import all items started.,Change detection engine,Information,Change detection engine import all items for connector SharePoint Connector started.,Normal
20120229,06:28:21,Request to get all entities from connector.,Connector,Information,Request to get all entities from connector SharePoint Connector.,Normal
20120229,06:28:21,Get all entities from connector failed.,Connector,Warning,"Get all entities from connector SharePoint Connector failed with reason Object reference not set to an instance of an object.. Duration: 00:00:00.0540054
Error details:
System.ServiceModel.FaultException`1System.ServiceModel.ExceptionDetail: Object reference not set to an instance of an object. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.NullReferenceException: Object reference not set to an instance of an object.
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.<>c_DisplayClass4.<GetOrganizationProfilePage>b_3()
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010ProfileServiceBase.TryElevate(CodeToRunElevated codeToRunElevated)
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.GetOrganizationProfilePage(Int64 skip, Int32 take)
at SyncInvokeGetOrganizationProfilePage(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatc...).",Normal
20120229,06:28:21,Change detection engine import all items failed.,Change detection engine,Warning,"Change detection engine import all items for connector SharePoint Connector failed with reason Object reference not set to an instance of an object.. Duration: 00:00:00.1530153
Error details:
System.ServiceModel.FaultException`1System.ServiceModel.ExceptionDetail: Object reference not set to an instance of an object. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.NullReferenceException: Object reference not set to an instance of an object.
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.<>c_DisplayClass4.<GetOrganizationProfilePage>b_3()
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010ProfileServiceBase.TryElevate(CodeToRunElevated codeToRunElevated)
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.GetOrganizationProfilePage(Int64 skip, Int32 take)
at SyncInvokeGetOrganizationProfilePage(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatc...).",Normal

Appears to be as before.

Hrm, don't even know how that is possible.

I'm going to reboot the sharepoint server and see if that helps. I looked in the GAC etc at when the last update occured and it matched when I ran the update, however I'll reboot in case anything weird is being cached. Did try an IISRESET.

I upgraded it by:

PS C:\Users\Administrator> stsadm.exe -o deletesolution -name 'unify.connectors.sharepoint.sharepoint2010wcfservice v3.0.5.5.wsp'

Operation completed successfully.

PS C:\Users\Administrator> stsadm -o addsolution -filename C:\Unify.Connectors.SharePoint.SharePoint2010WCFService.wsp

Operation completed successfully.

PS C:\Users\Administrator> stsadm -o deploysolution -name 'unify.connectors.sharepoint.sharepoint2010wcfservice.wsp' -im
mediate -allowgacdeployment

The timer job for this operation has been created, but it will fail because the administrative service for this server i
s not enabled. If the timer job is scheduled to run at a later time, you can run the jobs all at once using stsadm.exe -
o execadmsvcjobs. To avoid this problem in the future, enable the Microsoft SharePoint Foundation administrative service
, or run your operation through the STSADM.exe command line utility.
PS C:\Users\Administrator> stsadm.exe -o execadmsvcjobs

Executing job-application-server-admin-service.
Executing solution-deployment-unify.connectors.sharepoi-15bc4138-9701-4742-8b24-349e8315badd-0.
Operation completed successfully.

PS C:\Users\Administrator> iisreset

Attempting stop...
Internet services successfully stopped
Attempting start...
Internet services successfully restarted
PS C:\Users\Administrator>

Attached new Unify.Connectors.SharePoint.SharePoint2010WCFService.wsp, with additional error messages. I would be very surprised if this doesn't help track down the error!

The stored procedure to look for if you run a database trace is dbo.Profile_EnumProfiles.

As discussed, a wcf trace on the SharePoint service may also give us additional details, as should the additional logging I've added to the service.

Firstly, I've updated the connector to Mondays 3.0.5.6 release. I didn't realise that was available, possibly due to a mistake on my part. Until now I was on the 3.0.5.5 sharepoint connector uploaded on Friday.

I've also updated the WSP file to the latest provided in the comment above and the error message is slightly different. There is a "3 ---->" included before the null exception.

The Line

20120229,08:44:48,Get all entities from connector failed.,Connector,Warning,"Get all entities from connector SharePoint Connectorss failed with reason 3. Duration: 00:00:00.1570157
Error details:

also differs to what I previsouly had, which was previously

20120229,06:28:21,Get all entities from connector failed.,Connector,Warning,"Get all entities from connector SharePoint Connector failed with reason Object reference not set to an instance of an object.. Duration: 00:00:00.0540054
Error details:

Full error is:

20120229,08:44:47,Change detection engine import all items started.,Change detection engine,Information,Change detection engine import all items for connector SharePoint Connectorss started.,Normal
20120229,08:44:47,Request to get all entities from connector.,Connector,Information,Request to get all entities from connector SharePoint Connectorss.,Normal
20120229,08:44:48,Get all entities from connector failed.,Connector,Warning,"Get all entities from connector SharePoint Connectorss failed with reason 3. Duration: 00:00:00.1570157
Error details:
System.ServiceModel.FaultException`1System.ServiceModel.ExceptionDetail: 3 (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Exception: 3 ----> System.NullReferenceException: Object reference not set to an instance of an object.
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.<>c_DisplayClass4.<GetOrganizationProfilePage>b_3()
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010ProfileServiceBase.TryElevate(CodeToRunElevated codeToRunElevated)
— End of inner ExceptionDetail stack trace —
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010ProfileServiceBase.TryElevate(CodeToRunElevated codeToRunElevated)
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.GetOrganizationProfilePage(Int64 skip, Int32 take)
at SyncInvokeGetOrganizationProfilePage(Object , Object[] , Object[]...).",Normal
20120229,08:44:48,Change detection engine import all items failed.,Change detection engine,Warning,"Change detection engine import all items for connector SharePoint Connectorss failed with reason 3. Duration: 00:00:00.1740174
Error details:
System.ServiceModel.FaultException`1System.ServiceModel.ExceptionDetail: 3 (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Exception: 3 ----> System.NullReferenceException: Object reference not set to an instance of an object.
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.<>c_DisplayClass4.<GetOrganizationProfilePage>b_3()
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010ProfileServiceBase.TryElevate(CodeToRunElevated codeToRunElevated)
— End of inner ExceptionDetail stack trace —
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010ProfileServiceBase.TryElevate(CodeToRunElevated codeToRunElevated)
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.GetOrganizationProfilePage(Int64 skip, Int32 take)
at SyncInvokeGetOrganizationProfilePage(Object , Object[] , Object[]...).",Normal

I'm yet to do the DB trace, will look at it in the morning

Attached new Unify.Connectors.SharePoint.SharePoint2010WCFService.wsp.

Sorry, silly mistake with exception handling. That error doesn't help me.

From the database, monitoring RPS:Starting and RPC:Completed the following queries run

declare @p6 bigint
set @p6=1
declare @p7 bigint
set @p7=2
exec dbo.Profile_EnumProfiles @partitionID='0C37852B-34D0-418E-91C6-2AC25AF4BE5B',@correlationId='0B59ACE0-DA0C-454A-B5A2-77EB7EB50DC3',@ProfileTypeId=2,@BeginID=1,@EndID=501,@MINID=@p6 output,@MAXID=@p7 output
select @p6, @p7

The above returns two sets of results in SQL Server, the first is a single Column labelled "RecordID" with two rows, '1' and '2' respectively.

The second set is a single row with two unnamed columns with the values '1' and '2' respectively. These values correspond to the RecordIDs of the two organisations I have.

The next query is:

exec dbo.profile_GetOrganizationData @partitionID='0C37852B-34D0-418E-91C6-2AC25AF4BE5B',@correlationId='0B59ACE0-DA0C-454A-B5A2-77EB7EB50DC3',@OrgID=NULL,@RecordID=1

This returns the information of the root organisation (which is RecordID = 1). The UserProfile_GUID, PreferredName and IdMProfileReference attributes are the three returned

Notable here is there is no query that I can see being performed to return the data for the second organisation, eg RecordID = 2. I manually ran that second query with the RecirdID set as 2 and got the data for that organisation as I would expect.

Attaching the database table that has the org structure.

When we discussed this with Matt last week, he suggested changing the ParentType to be the same as the ProfileSubtypeID and the Parent to be the same as the Record ID for the root organisation.

He was off site and presumably had no access to his system, however I just want to highlight that a default install has a NULL ParentType for the root and a parent of -1. Attached the convo also.

It may just be things getting lost due to not being at the PC, but have any incorrect assumptions been made about the state of the root node that could effect the solution?

Matthew's comment was questioning whether your database had the values that match what a fresh install would have. There may be other issues with the WCF endpoint, but the point is that it's failing before we get a chance to do anything as something is coming back null from the SharePoint API that shouldn't.

Appears to be the same error.

20120229,23:58:54,Change detection engine import all items started.,Change detection engine,Information,Change detection engine import all items for connector SharePoint Connectorss started.,Normal
20120229,23:58:54,Request to get all entities from connector.,Connector,Information,Request to get all entities from connector SharePoint Connectorss.,Normal
20120229,23:58:54,Get all entities from connector failed.,Connector,Warning,"Get all entities from connector SharePoint Connectorss failed with reason 3. Duration: 00:00:00.0650065
Error details:
System.ServiceModel.FaultException`1System.ServiceModel.ExceptionDetail: 3 (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Exception: 3 ----> System.NullReferenceException: Object reference not set to an instance of an object.
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.<>c_DisplayClass4.<GetOrganizationProfilePage>b_3()
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010ProfileServiceBase.TryElevate(CodeToRunElevated codeToRunElevated)
— End of inner ExceptionDetail stack trace —
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010ProfileServiceBase.TryElevate(CodeToRunElevated codeToRunElevated)
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.GetOrganizationProfilePage(Int64 skip, Int32 take)
at SyncInvokeGetOrganizationProfilePage(Object , Object[] , Object[]...).",Normal
20120229,23:58:54,Change detection engine import all items failed.,Change detection engine,Warning,"Change detection engine import all items for connector SharePoint Connectorss failed with reason 3. Duration: 00:00:00.0810081
Error details:
System.ServiceModel.FaultException`1System.ServiceModel.ExceptionDetail: 3 (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Exception: 3 ----> System.NullReferenceException: Object reference not set to an instance of an object.
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.<>c_DisplayClass4.<GetOrganizationProfilePage>b_3()
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010ProfileServiceBase.TryElevate(CodeToRunElevated codeToRunElevated)
— End of inner ExceptionDetail stack trace —
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010ProfileServiceBase.TryElevate(CodeToRunElevated codeToRunElevated)
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.GetOrganizationProfilePage(Int64 skip, Int32 take)
at SyncInvokeGetOrganizationProfilePage(Object , Object[] , Object[]...).",Normal

Attached new Unify.Connectors.SharePoint.SharePoint2010WCFService.wsp where there is separate error handling and null checks for pretty much every line of code involved.

20120301,03:25:05,Request to get all entities from connector.,Connector,Information,Request to get all entities from connector SharePoint Connectorss.,Normal
20120301,03:25:05,Get all entities from connector failed.,Connector,Warning,"Get all entities from connector SharePoint Connectorss failed with reason 3. Duration: 00:00:00.1210121
Error details:
System.ServiceModel.FaultException`1System.ServiceModel.ExceptionDetail: 3 (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Exception: 3 ----> System.Exception: 208e8fad-b1ad-47cc-8910-51667946955c
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010ProfileServiceBase.NullCheck(Object item, Guid id)
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.CreateOrganizationProfileDataFromProfile(OrganizationProfile profile, ProfileSubtype subtype, OrganizationProfileManager profileService)
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.<>c_DisplayClass4.<GetOrganizationProfilePage>b_3()
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010ProfileServiceBase.TryElevate(CodeToRunElevated codeToRunElevated)
— End of inner ExceptionDetail stack trace —
at Unify.Connectors.SharePoi...).",Normal
20120301,03:25:05,Change detection engine import all items failed.,Change detection engine,Warning,"Change detection engine import all items for connector SharePoint Connectorss failed with reason 3. Duration: 00:00:00.1300130
Error details:
System.ServiceModel.FaultException`1System.ServiceModel.ExceptionDetail: 3 (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Exception: 3 ----> System.Exception: 208e8fad-b1ad-47cc-8910-51667946955c
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010ProfileServiceBase.NullCheck(Object item, Guid id)
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.CreateOrganizationProfileDataFromProfile(OrganizationProfile profile, ProfileSubtype subtype, OrganizationProfileManager profileService)
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010OrganizationProfileService.<>c_DisplayClass4.<GetOrganizationProfilePage>b_3()
at Unify.Connectors.SharePoint.SharePoint2010WCFService.UNIFYIdentityBrokerService.SharePoint2010ProfileServiceBase.TryElevate(CodeToRunElevated codeToRunElevated)
— End of inner ExceptionDetail stack trace —
at Unify.Connectors.SharePoi...).",Normal

The following queries appear to be running in a loop, except that the correlationId is changing with each block of 7 queries.

declare @p6 bigint
set @p6=NULL
declare @p7 bigint
set @p7=NULL
exec dbo.Profile_EnumProfiles @partitionID='0C37852B-34D0-418E-91C6-2AC25AF4BE5B',@correlationId='77C6EC45-62B2-444E-9210-7CFB9E9C4A8F',@ProfileTypeId=2,@BeginID=0,@EndID=500,@MINID=@p6 output,@MAXID=@p7 output
select @p6, @p7

exec dbo.profile_GetOrganizationData @partitionID='0C37852B-34D0-418E-91C6-2AC25AF4BE5B',@correlationId='77C6EC45-62B2-444E-9210-7CFB9E9C4A8F',@OrgID=NULL,@RecordID=1

exec dbo.profile_GetOrganizationMemberships @partitionID='0C37852B-34D0-418E-91C6-2AC25AF4BE5B',@correlationId='77C6EC45-62B2-444E-9210-7CFB9E9C4A8F',@RecordID=1

exec dbo.profile_GetOrganizationData @partitionID='0C37852B-34D0-418E-91C6-2AC25AF4BE5B',@correlationId='77C6EC45-62B2-444E-9210-7CFB9E9C4A8F',@OrgID=NULL,@RecordID=2

exec dbo.profile_GetOrganizationData @partitionID='0C37852B-34D0-418E-91C6-2AC25AF4BE5B',@correlationId='77C6EC45-62B2-444E-9210-7CFB9E9C4A8F',@OrgID=NULL,@RecordID=1

exec dbo.profile_GetOrganizationData @partitionID='0C37852B-34D0-418E-91C6-2AC25AF4BE5B',@correlationId='77C6EC45-62B2-444E-9210-7CFB9E9C4A8F',@OrgID=NULL,@RecordID=1

exec dbo.profile_GetOrganizationMemberships @partitionID='0C37852B-34D0-418E-91C6-2AC25AF4BE5B',@correlationId='77C6EC45-62B2-444E-9210-7CFB9E9C4A8F',@RecordID=2

Code that has been confirmed to work (dev), has been pushed to the repo. Now needs to be regression tested due to the change in logic.

Matthew to look at fixing up the parameter names also.

Adam,

The parameter names have been updated and the service contract has been updated in the communicator. Imports perform as expected. Exports are still also working well on my local machine.

I have uploaded the latest development builds of the connector, WCF service, and Connector Configuration Plug-In to the SUBIDBSP:Downloads page. Note that the WCF service will need to be redeployed to SharePoint in order for the connector and the Configuration plug-in to work correctly.

Organization profiles are importing and baselining correctly in SharePoint, with Event Broker able to rectify any profiles who are missed with an "exported-change-not-reimported" error (as expected).

To be logged elsewhere, the following error was encountered when the IdBID was provisioned. Note that Organization Profile is not a ModifyAnchor connector:

System.ServiceModel.FaultException`1System.ServiceModel.ExceptionDetail: Object reference not set to an instance of an object. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:

System.NullReferenceException: Object reference not set to an instance of an object.
at Unify.Notification.TaskNotifier`1.Dispose()
at Unify.Framework.EventNotifierModifyAnchorConnectorDecorator.ModifyAnchor(MultiKeyValue oldKey, MultiKeyValue newKey)
at Unify.Framework.Adapter.<>c_DisplayClass34.<CheckAnchorChangeOnSave>b_2f(KeyValuePair`2 keyValue)
at Unify.Framework.Visitor.<>c_DisplayClass1`1.<Visit>b_0(T item, Int32 index)
at Unify.Framework.Visitor.VisitT(IEnumerable`1 visitCollection, Action`2 visitor)
at Unify.Framework.Visitor.VisitT(IEnumerable`1 visitCollection, Action`1 visitor)
at Unify.Framework.Adapter.CheckAnchorChangeOnSave(IEntitySchema connectorSchema, IEnumerable`1 entitiesToSave, IEntityPartitionUpdatableContext connectorContext, IEnumerable`1 entityIds)
at Unify.Framework.Adapter.SaveEntities(IEnumerable`1 entities, Boolean reflect)
at Unify.Framework.A...).

This occurred where RecordId was set to the key.

Can this issue be closed?

With the above error, is it a documentation issue, a bug, or a place for a better exception message? Could you please create the issue most appropriate?

Thanks.

I've created IDB-295 for investigating the other issue, but as far as I'm concerned this is working appropriately. Marking as resolved and assigning to Richard for confirmation.

Everything appears to be working fine. Closing