Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Unanswered

Workflow denied access

Posted on by 1,695

CRM 2016 On premises

I have previously created a SSRS report using SQL server as a data source, uploaded it into CRM and accessed it vis a workflow.

I have now created a SSRS report using fetch XML and uploaded it into CRM. on the SQL server , I can log into reporting services as Domain Admin and can run the report, likewise in CRM, logged in as Domain Admin I cam run the report from the report page. …  so far so good.

Using the same code for a workflow to generate a PDF of the report, I keep getting an error 'user was not found'

I have checked the code of the workflow that generates a PDF from a report ( report using SQL data Source ) and apart from the report name, the code is sound.

I'm presuming it is something to do with the Data Source being accessed from a workflow

1. signed into CRM as Domain/Admin I can manually run the report

2. signed into Reporting services as Domain/Admin I can run the report

3. the CRM process was generated under Domain/Admin and executes as owner of the workflow ( Domain/Admin) and scope is Organization

When the workflow is executed I get the following error in reporting services

processing!ReportServer_0-1!12e8!01/04/2020-18:08:12:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: , Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'CRMXML'. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException:
Microsoft.Crm.CrmException: An unexpected error occurred.
Microsoft.Crm.CrmConfigObjectNotFoundException: User Was Not Found ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: An unexpected error occurred. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: User Was Not Found
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at Microsoft.Crm.Reporting.DataExtension.Common.ExceptionManager.HandleUnsafeException(Action body)
   at Microsoft.Crm.Reporting.DataExtensionShim.Common.ICrmDbConnectionExtension.Open(String userSid)
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.<>c__DisplayClass5.<OpenConnection>b__4()
   --- End of inner exception stack trace ---;
processing!ReportServer_0-1!12e8!01/04/2020-18:08:12:: e ERROR: Data source 'CRMXML': An error has occurred. Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'CRMXML'. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException:
Microsoft.Crm.CrmException: An unexpected error occurred.
Microsoft.Crm.CrmConfigObjectNotFoundException: User Was Not Found ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: An unexpected error occurred. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: User Was Not Found
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at Microsoft.Crm.Reporting.DataExtension.Common.ExceptionManager.HandleUnsafeException(Action body)
   at Microsoft.Crm.Reporting.DataExtensionShim.Common.ICrmDbConnectionExtension.Open(String userSid)
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.<>c__DisplayClass5.<OpenConnection>b__4()
   --- End of inner exception stack trace ---
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.<>c__DisplayClass5.<OpenConnection>b__4()
   at Microsoft.ReportingServices.Diagnostics.Utilities.DefaultActivitiesFactory.CreateSyncActivityAndReportResult(RSActivityType activityType, Action action)
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.<>c__DisplayClass2.<OpenDataSourceExtensionConnection>b__0()
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.HandleImpersonation(IProcessingDataSource dataSource, DataSourceInfo dataSourceInfo, String datasetName, IDbConnection connection, Action afterImpersonationAction)
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.OpenDataSourceExtensionConnection(IProcessingDataSource dataSourceObj, String connectString, DataSourceInfo dataSourceInfo, String datasetName)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.<>c__DisplayClass1.<OpenConnection>b__0()
   at Microsoft.ReportingServices.Diagnostics.Utilities.DefaultActivitiesFactory.CreateSyncActivityAndReportResult(RSActivityType activityType, Action action)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.OpenConnection(DataSource dataSourceObj, DataSet dataSetObj, OnDemandProcessingContext pc, DataProcessingMetrics metrics)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.OpenInitialConnectionAndTransaction()
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.InitializeDataSource(ExecutedQuery existingQuery)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataSource.Process(Boolean fromOdp)
processing!ReportServer_0-1!12e8!01/04/2020-18:08:12:: e ERROR: An exception has occurred in data source 'CRMXML'. Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'CRMXML'. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException:
Microsoft.Crm.CrmException: An unexpected error occurred.
Microsoft.Crm.CrmConfigObjectNotFoundException: User Was Not Found ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: An unexpected error occurred. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: User Was Not Found
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at Microsoft.Crm.Reporting.DataExtension.Common.ExceptionManager.HandleUnsafeException(Action body)
   at Microsoft.Crm.Reporting.DataExtensionShim.Common.ICrmDbConnectionExtension.Open(String userSid)
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.<>c__DisplayClass5.<OpenConnection>b__4()
   --- End of inner exception stack trace ---
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.<>c__DisplayClass5.<OpenConnection>b__4()
   at Microsoft.ReportingServices.Diagnostics.Utilities.DefaultActivitiesFactory.CreateSyncActivityAndReportResult(RSActivityType activityType, Action action)
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.<>c__DisplayClass2.<OpenDataSourceExtensionConnection>b__0()
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.HandleImpersonation(IProcessingDataSource dataSource, DataSourceInfo dataSourceInfo, String datasetName, IDbConnection connection, Action afterImpersonationAction)
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.OpenDataSourceExtensionConnection(IProcessingDataSource dataSourceObj, String connectString, DataSourceInfo dataSourceInfo, String datasetName)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.<>c__DisplayClass1.<OpenConnection>b__0()
   at Microsoft.ReportingServices.Diagnostics.Utilities.DefaultActivitiesFactory.CreateSyncActivityAndReportResult(RSActivityType activityType, Action action)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.OpenConnection(DataSource dataSourceObj, DataSet dataSetObj, OnDemandProcessingContext pc, DataProcessingMetrics metrics)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.OpenInitialConnectionAndTransaction()
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.InitializeDataSource(ExecutedQuery existingQuery)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataSource.Process(Boolean fromOdp)
processing!ReportServer_0-1!12e8!01/04/2020-18:08:12:: i INFO: DataPrefetch abort handler called for Report with ID=. Aborting data sources ...
processing!ReportServer_0-1!12e8!01/04/2020-18:08:12:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: [AbnormalTermination:ReportProcessing], Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'CRMXML'. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException:
Microsoft.Crm.CrmException: An unexpected error occurred.
Microsoft.Crm.CrmConfigObjectNotFoundException: User Was Not Found ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: An unexpected error occurred. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: User Was Not Found
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at Microsoft.Crm.Reporting.DataExtension.Common.ExceptionManager.HandleUnsafeException(Action body)
   at Microsoft.Crm.Reporting.DataExtensionShim.Common.ICrmDbConnectionExtension.Open(String userSid)
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.<>c__DisplayClass5.<OpenConnection>b__4()
   --- End of inner exception stack trace ---
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.<>c__DisplayClass5.<OpenConnection>b__4()
   at Microsoft.ReportingServices.Diagnostics.Utilities.DefaultActivitiesFactory.CreateSyncActivityAndReportResult(RSActivityType activityType, Action action)
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.<>c__DisplayClass2.<OpenDataSourceExtensionConnection>b__0()
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.HandleImpersonation(IProcessingDataSource dataSource, DataSourceInfo dataSourceInfo, String datasetName, IDbConnection connection, Action afterImpersonationAction)
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.OpenDataSourceExtensionConnection(IProcessingDataSource dataSourceObj, String connectString, DataSourceInfo dataSourceInfo, String datasetName)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.<>c__DisplayClass1.<OpenConnection>b__0()
   at Microsoft.ReportingServices.Diagnostics.Utilities.DefaultActivitiesFactory.CreateSyncActivityAndReportResult(RSActivityType activityType, Action action)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.OpenConnection(DataSource dataSourceObj, DataSet dataSetObj, OnDemandProcessingContext pc, DataProcessingMetrics metrics)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.OpenInitialConnectionAndTransaction()
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.InitializeDataSource(ExecutedQuery existingQuery)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataSource.Process(Boolean fromOdp)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataS
library!ReportServer_0-1!12e8!01/04/2020-18:08:12:: w WARN: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'CRMXML'. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException:
Microsoft.Crm.CrmException: An unexpected error occurred.
Microsoft.Crm.CrmConfigObjectNotFoundException: User Was Not Found ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: An unexpected error occurred. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: User Was Not Found
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at Microsoft.Crm.Reporting.DataExtension.Common.ExceptionManager.HandleUnsafeException(Action body)
   at Microsoft.Crm.Reporting.DataExtensionShim.Common.ICrmDbConnectionExtension.Open(String userSid)
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.<>c__DisplayClass5.<OpenConnection>b__4()
   --- End of inner exception stack trace ---
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.<>c__DisplayClass5.<OpenConnection>b__4()
   at Microsoft.ReportingServices.Diagnostics.Utilities.DefaultActivitiesFactory.CreateSyncActivityAndReportResult(RSActivityType activityType, Action action)
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.<>c__DisplayClass2.<OpenDataSourceExtensionConnection>b__0()
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.HandleImpersonation(IProcessingDataSource dataSource, DataSourceInfo dataSourceInfo, String datasetName, IDbConnection connection, Action afterImpersonationAction)
   at Microsoft.ReportingServices.Diagnostics.DataExtensionConnectionBase.OpenDataSourceExtensionConnection(IProcessingDataSource dataSourceObj, String connectString, DataSourceInfo dataSourceInfo, String datasetName)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.<>c__DisplayClass1.<OpenConnection>b__0()
   at Microsoft.ReportingServices.Diagnostics.Utilities.DefaultActivitiesFactory.CreateSyncActivityAndReportResult(RSActivityType activityType, Action action)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.OpenConnection(DataSource dataSourceObj, DataSet dataSetObj, OnDemandProcessingContext pc, DataProcessingMetrics metrics)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.OpenInitialConnectionAndTransaction()
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.InitializeDataSource(ExecutedQuery existingQuery)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataSource.Process(Boolean fromOdp)
   at Microsoft.ReportingServices.OnDemandProcessing.RuntimeAtomicDataSource.ProcessConcurrent(Object threadSet)
   --- End of inner exception stack trace ---
   at Microsoft.ReportingService

  • erhan.keskin Profile Picture
    erhan.keskin 2,247 on at
    RE: Workflow denied access

    Hi,

    I assume it passes the identity of CRM Asynchronous service or the computer account (e.g. ComputerName$), so these users might not have enough privilege to create connection to 'CRMXML'.

    You can try something like this if the data source is not shared data source;

    - convert the Data Source to Shared Data Source with Windows Authentication (Integrated Security)

    - set current (non-shared) Data Source (on the Left Pane "Report Data") as "Don't Use Credentials".

    - on the Project Properties, set for "Deployment" "Overwrite DataSources" to "True" and redeploy the Project.

    or

    - if the report doesn't need integrated data source, you can set the credential on the data source.

    Regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans