1

We are using Microsoft Power BI to mine into xConnect OData. We are interested, among other things, in the Interactions of our contacts. However, Power BI generates requests that cannot be fulfilled by xConnect OData, such as this one:

GET https://[xconnect-search-host]/odata/Contacts([contact-id])/Identifiers

This is a valid OData query, but xConnect fails with this error message:

{
  "ClassName": "System.InvalidOperationException",
  "Message": "Parent context is required for this entity type",
  "Data": null,
  "InnerException": null,
  "HelpURL": null,
  "StackTraceString": "   at Sitecore.XConnect.Web.Infrastructure.Serialization.Newtonsoft.Context.ContextProvider.GetContext(IEdmType type, SelectExpand selectExpand, String entitySetName)\r\n   at Sitecore.XConnect.Web.Infrastructure.Serialization.Newtonsoft.ODataJsonSerializer.Serialize(JsonWriter writer, Object value, ODataSerializationOptions options)\r\n   at Sitecore.XConnect.Web.Infrastructure.Serialization.Newtonsoft.ODataJsonSerializer.Serialize(TextWriter writer, Object value, ODataSerializationOptions options)\r\n   at Sitecore.XConnect.Web.Infrastructure.Serialization.Newtonsoft.ODataFormatter.WriteToStreamAsync[TValue](TValue value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken)",
  "RemoteStackTraceString": null,
  "RemoteStackIndex": 0,
  "ExceptionMethod": "8\nGetContext\nSitecore.XConnect.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\nSitecore.XConnect.Web.Infrastructure.Serialization.Newtonsoft.Context.ContextProvider\nSitecore.XConnect.Web.Infrastructure.Serialization.Newtonsoft.Context.ContextEntry GetContext(Microsoft.OData.Edm.IEdmType, Sitecore.XConnect.Web.Infrastructure.Serialization.Newtonsoft.SelectExpand, System.String)",
  "HResult": -2146233079,
  "Source": "Sitecore.XConnect.Web",
  "WatsonBuckets": null
}

Interestingly, the closely related query resolves correctly:

GET https://[xconnect-search-host]/odata/Contacts([contact-id])?$expand=Interactions

Is this a known error in Sitecore? Is there a workaround or hotfix that could resolve it?

Keep in mind that we cannot control the requests that are generated by Power BI and that they are valid OData 4 requests anyway, which xConnect claims to support.

We are using Sitecore 9 update 2 (version 9.0.2).

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.