rappen / FetchXMLBuilder

FetchXML Builder for XrmToolBox and Microsoft Dynamics 365 / CRM
https://fetchxmlbuilder.com/
GNU General Public License v3.0
134 stars 55 forks source link

initiatingPluginExecutionContext.InitiatingPluginInfoProvider is null. Restricted API is not called by Microsoft publisher plugin #1058

Closed parvezghumra closed 1 month ago

parvezghumra commented 1 month ago

Hey @rappen. I've just run into this error. Details below.


System.ServiceModel.FaultException<Microsoft.Xrm.Sdk.OrganizationServiceFault>:
initiatingPluginExecutionContext.InitiatingPluginInfoProvider is null. Restricted API is not called by Microsoft publisher plugin.
FetchXML Builder

Server stack trace: 
- System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
- System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
- System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
- System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
- Microsoft.Xrm.Tooling.Connector.CrmServiceClient.RetrieveMultiple(QueryBase query)
- Rappen.XRM.Helpers.Extensions.ServiceExtensions.RetrieveMultipleAll(IOrganizationService service, QueryBase query, BackgroundWorker worker, DoWorkEventArgs eventargs, String message, Boolean showMessageOnFirstPage)
- Rappen.XTB.FetchXmlBuilder.FetchXmlBuilder.<>c__DisplayClass127_0.<RetrieveMultiple>b__0(BackgroundWorker worker, DoWorkEventArgs eventargs)
- System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
- System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

<fetch>
  <entity name="solutionhistorydata">
    <attribute name="endtime" />
    <attribute name="ismanaged" />
    <attribute name="packagename" />
    <attribute name="packageversion" />
    <attribute name="publishername" />
    <attribute name="result" />
    <attribute name="solutionhistorydataid" />
    <attribute name="solutionname" />
    <attribute name="solutionversion" />
    <attribute name="starttime" />
    <attribute name="status" />
    <attribute name="suboperation" />
    <order attribute="starttime" descending="true" />
  </entity>
</fetch>

MarkMpn commented 1 month ago

Microsoft seem to have locked down access to this entity for some reason - you need to use the msdyn_solutionhistory virtual entity instead.

parvezghumra commented 1 month ago

Nice one, thanks @MarkMpn