"There was no Claim specifying the Application Id" error while using HTTP POST call against Dynamics 365 for Operations

Hi All,

I have created One Composite entity.

using this composite entity for recurring data job.

while using HTTP GET call against the following URL getting below error.

https:///api/connector/dequeue/<activity id>

URL:https://xyz-testdevaos.sandbox.ax.dynamics.com/api/connector/dequeue/9B64E276-580B-456A-B975-B07B53ABEE9D

“Message”: “An error has occurred.”, “ExceptionMessage”: “There was no Claim specifying the Application Id.”, “ExceptionType”: “System.Security.SecurityException”, “StackTrace”: " at Microsoft.Dynamics.Platform.Integration.Services.WebApi.Connector.ConnectorExceptionHandlingAttribute.OnException(HttpActionExecutedContext actionExecutedContext)\r\n at System.Web.Http.Filters.ExceptionFilterAttribute.OnExceptionAsync(HttpActionExecutedContext actionExecutedContext, CancellationToken cancellationToken)\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at

Thanks

I am facing same problem…I am trying to import .csv file using DIXF recurrence job using REST api 's in c# program…Please provide the solution for above error.

Moved to “Dynamics 365 For Operations” forum aka. “Dynamics AX Devlopers Forum”. Better change of an answer in there. [:)]

It seems that you’re not doing the authentication correctly. Request must contain the application ID registered in Azure Active Directory, which doesn’t seem to be the case in your implementation.

Rather then reinventing the wheel, borrow the code from Microsoft samples.

Hi Martin,

Thanks for the reply. I tried to use Microsoft samples. but I get this exception while executing the app.

{“Could not load file or assembly ‘Microsoft.Dynamics.AX.Framework.Tools.DataManagement.Serialization, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)”:“Microsoft.Dynamics.AX.Framework.Tools.DataManagement.Serialization, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”}

what does this mean?

Also,

for Recurring job implementation I am using below URL.

https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/data-entities/recurring-integrations

My GET request is as below, first I am trying export operation.

https:///api/connector/dequeue/{}.

where, activity id is a GUID of recurring job. and application ID is a Azure AD id registered to the recurring job.

So do we need to pass AAD application Id in GET request?

Please give us more information which of the samples are you using in the moment, what version of AX tools for VS you have and so on.

If your goal is recurring file-based integration, consider using Recurring Integrations Scheduler.

I am using
Microsoft sample solution from this link:
github.com/…/DIXFSamplesSolution.sln

VS: Microsoft Visual Studio Enterprise 2017
Version 15.1 (26403.7) Release
VisualStudio.15.Release/15.1.0+26403.7
Microsoft .NET Framework
Version 4.7.02046

AX Tool: Dynamics 365 for operations (free 30 day trial using Ms Lifecycle services)

project requirement is to do recurring job using C# and REST.

Are you completely sure that you want to invest time into this older solution instead of using the Recurring Integrations Scheduler? I wouldn’t.

I tried using Recurring Integrations Scheduler …
I received this exception after adding Export job to the scheduler.

pastedimage1507106897021v1.png

is it problem with Quartz version I am using ?

What should be the query param for the application Id, or should it be in the headers?
P.S. I can’t use the Microsoft samples or the new way of integration as you mentioned below, because I’m trying to build a NodeJs application that fetches data from MS dynamics FnO.

You can find examples how to with AAD/OAuth in Node.js, such as this. Note that you’ll get better help about Node.js in Node.js forums.