All reports on Dynamics AX 365 F&O production environment gives a forbidden exception

Hi everybody,

I got an exception while trying to run any standard report on production environment for Dynamics AX 365 F&O

The reports are working well on test environment , I have compared everything between the two environments but no change

The database version is SQL Server 2016 standard on two environments

The exception message :-

An exception occured during Ax Report Provider execution.

  • System
    • Provider
      [ Name] Microsoft-Dynamics-AX-SSRSReportExtensions
      [ Guid] {68C22D8C-C670-406A-B48B-2E7F0551F904}

      Channel Microsoft-Dynamics-AX-SSRSReportExtensions/Operational

  • EventData
    className AxReportProviderCommand
    methodName OnExecuteReader

exceptionMessage System.InvalidOperationException: An exception occurred in the query metadata execution. The exception is Forbidden. —> Microsoft.Dynamics.AX.Framework.Services.Client.QueryServiceException: Forbidden —> System.ServiceModel.FaultException: Forbidden Server stack trace: at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object ins, Object outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Microsoft.Dynamics.AX.Framework.Services.QueryService.IQueryService.ExecuteStreamedDynamicQuery(String queryBuilderName, QueryBuilderArgs queryBuilderArgs, Paging paging) at Microsoft.Dynamics.AX.Framework.Services.Client.QueryClientInternal.<>c__DisplayClass21_0.b__0(IQueryService queryClient) at Microsoft.Dynamics.AX.Framework.Services.Client.ServiceClientHelper.InvokeChannelOperation[TResult,TChannel](IServiceClient1 client, Func2 operationInvoker, Func2 exceptionWrapper) --- End of inner exception stack trace --- at Microsoft.Dynamics.AX.Framework.Services.Client.ServiceClientHelper.InvokeChannelOperation[TResult,TChannel](IServiceClient1 client, Func2 operationInvoker, Func2 exceptionWrapper) at Microsoft.Dynamics.AX.Framework.Services.Client.QueryClientInternal.ExecuteStreamedDynamicQuery(String queryBuilderName, QueryBuilderArgs queryBuilderArgs, Paging paging) at Microsoft.Dynamics.AX.Framework.Services.Client.QueryClient.ExecuteStreamedDynamicQuery(String queryBuilderName, QueryBuilderArgs queryBuilderArgs, Paging paging) at Microsoft.Dynamics.AX.Framework.Services.Client.StreamedQueryDataSession…ctor(String queryBuilderName, QueryBuilderArgs queryBuilderArgs, Paging paging) at Microsoft.Dynamics.AX.Framework.Services.Client.QueryClient.GetStreamedDynamicQueryDataSession(String queryBuilderName, QueryBuilderArgs queryBuilderArgs, Paging paging) at Microsoft.Dynamics.AX.Framework.Reporting.Shared.ClientServicesProxy.OnGetStreamedDynamicQueryDataSession(String queryBuilderName, QueryBuilderArgs queryBuilderArgs, Int32 pageSize) at Microsoft.Dynamics.AX.Framework.Reporting.Shared.ClientServicesProxy.GetStreamedDynamicQueryDataSession(String queryBuilderName, QueryBuilderArgs queryBuilderArgs, Int32 pageSize) at Microsoft.Dynamics.AX.Framework.Reporting.Shared.AxAsyncServiceExecuter.ReadPageThreadWorker() — End of inner exception stack trace — at Microsoft.Dynamics.AX.Framework.Reporting.Shared.BlockingQueue1.Dequeue() at Microsoft.Dynamics.AX.Framework.Reporting.Shared.AxReportProviderServiceExecuter.GetPagedDateSet() at Microsoft.Dynamics.AX.Framework.Reporting.Shared.AxReportProviderServiceExecuter.GetPagedDataTable(String dataTableName) at Microsoft.Dynamics.AX.Framework.Reporting.Shared.AxReportProviderServiceExecuter.GetDataTable(AxReportProviderQueryElements reportProviderQueryElements) at Microsoft.Dynamics.AX.Framework.Reporting.Shared.AxReportProviderServiceExecuterExtensions.GetDataTableReader(AxReportProviderServiceExecuter executer, AxReportProviderQueryElements reportProviderQueryElements) at Microsoft.Dynamics.Framework.Reports.AxReportProviderCommand.OnExecuteReader(CommandBehavior behavior) exceptionType InvalidOperationException stackTrace System.InvalidOperationException: An exception occurred in the query metadata execution. The exception is Forbidden. ---> Microsoft.Dynamics.AX.Framework.Services.Client.QueryServiceException: Forbidden ---> System.ServiceModel.FaultException: Forbidden Server stack trace: at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Microsoft.Dynamics.AX.Framework.Services.QueryService.IQueryService.ExecuteStreamedDynamicQuery(String queryBuilderName, QueryBuilderArgs queryBuilderArgs, Paging paging) at Microsoft.Dynamics.AX.Framework.Services.Client.QueryClientInternal.<>c__DisplayClass21_0.<ExecuteStreamedDynamicQuery>b__0(IQueryService queryClient) at Microsoft.Dynamics.AX.Framework.Services.Client.ServiceClientHelper.InvokeChannelOperation[TResult,TChannel](IServiceClient1 client, Func2 operationInvoker, Func2 exceptionWrapper) — End of inner exception stack trace — at Microsoft.Dynamics.AX.Framework.Services.Client.ServiceClientHelper.InvokeChannelOperation[TResult,TChannel](IServiceClient1 client, Func2 operationInvoker, Func2 exceptionWrapper) at Microsoft.Dynamics.AX.Framework.Services.Client.QueryClientInternal.ExecuteStreamedDynamicQuery(String queryBuilderName, QueryBuilderArgs queryBuilderArgs, Paging paging) at Microsoft.Dynamics.AX.Framework.Services.Client.QueryClient.ExecuteStreamedDynamicQuery(String queryBuilderName, QueryBuilderArgs queryBuilderArgs, Paging paging) at Microsoft.Dynamics.AX.Framework.Services.Client.StreamedQueryDataSession..ctor(String queryBuilderName, QueryBuilderArgs queryBuilderArgs, Paging paging) at Microsoft.Dynamics.AX.Framework.Services.Client.QueryClient.GetStreamedDynamicQueryDataSession(String queryBuilderName, QueryBuilderArgs queryBuilderArgs, Paging paging) at Microsoft.Dynamics.AX.Framework.Reporting.Shared.ClientServicesProxy.OnGetStreamedDynamicQueryDataSession(String queryBuilderName, QueryBuilderArgs queryBuilderArgs, Int32 pageSize) at Microsoft.Dynamics.AX.Framework.Reporting.Shared.ClientServicesProxy.GetStreamedDynamicQueryDataSession(String queryBuilderName, QueryBuilderArgs queryBuilderArgs, Int32 pageSize) at Microsoft.Dynamics.AX.Framework.Reporting.Shared.AxAsyncServiceExecuter.ReadPageThreadWorker() --- End of inner exception stack trace --- at Microsoft.Dynamics.AX.Framework.Reporting.Shared.BlockingQueue1.Dequeue() at Microsoft.Dynamics.AX.Framework.Reporting.Shared.AxReportProviderServiceExecuter.GetPagedDateSet() at Microsoft.Dynamics.AX.Framework.Reporting.Shared.AxReportProviderServiceExecuter.GetPagedDataTable(String dataTableName) at Microsoft.Dynamics.AX.Framework.Reporting.Shared.AxReportProviderServiceExecuter.GetDataTable(AxReportProviderQueryElements reportProviderQueryElements) at Microsoft.Dynamics.AX.Framework.Reporting.Shared.AxReportProviderServiceExecuterExtensions.GetDataTableReader(AxReportProviderServiceExecuter executer, AxReportProviderQueryElements reportProviderQueryElements) at Microsoft.Dynamics.Framework.Reports.AxReportProviderCommand.OnExecuteReader(CommandBehavior behavior)

Please I need your support ASAP

I think you should raise a support request with Microsoft.