web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

How to get Execution ID/Job ID of Recurring Integration Job using ODATA API call

(2) ShareShare
ReportReport
Posted on by 11

Hi, I have used ODATA API to enqueue the file which returns message ID as response. However, I need ExecutionID/Job ID to further query the job status and execution details. Is there a way to get Execution ID/JobID using message ID ? 

Enqueue API  -  https://{{host}}/api/connector/enqueue/%7Bxxxxxxxxxxxxxxxxxxxxxxx%7D?entity=LedgerJournalMultiEntity&company=XXX

GetExecutionErrors  - https://{{host}}/data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetExecutionErrors

I have the same question (0)
  • Alex VN Profile Picture
    1,994 on at
    RE: How to get Execution ID/Job ID of Recurring Integration Job using ODATA API call

    Hi,

    I believe when you call the enqueue API or get status then the response will also contain the job ID returned from D365FO. Can you try to check for that response and compare?

  • IntegrationGuy Profile Picture
    11 on at
    RE: How to get Execution ID/Job ID of Recurring Integration Job using ODATA API call

    Hi Alex, Unfortunately, Enqueue API returns only message ID in the response. It doesn't return the Job ID. Do you know a way to get the Job ID using message ID ?

    Thanks,

    Bala

  • voidmissing Profile Picture
    7 on at
    RE: How to get Execution ID/Job ID of Recurring Integration Job using ODATA API call

    Hi IntegrationGuy

    Did you find the way how to get ExecutionID using MessageID? I have exactly the same issue as you have described.

    Thanks, S

  • AnithaEswaran Profile Picture
    2,032 on at
    RE: How to get Execution ID/Job ID of Recurring Integration Job using ODATA API call

    Hi,

    Use the below query to find the execution id

    select integrationActivityMessageTable

               where integrationActivityMessageTable.MessageId == messageId

    join integrationActivityRuntimeExecutionTable

               where integrationActivityRuntimeExecutionTable.CorrelationId ==   integrationActivityMessageTable.ActivityRuntimeExecutionCorrelationId;

    executionid = integrationActivityRuntimeExecutionTable.executionId;

  • Community member Profile Picture
    4 on at
    How to get Execution ID/Job ID of Recurring Integration Job using ODATA API call
    Hey I am facing the exact same problem and work around to solve this. 
  • accorti Profile Picture
    4 on at
    How to get Execution ID/Job ID of Recurring Integration Job using ODATA API call
    We are encountering the same issue.
     
    1. The execution ID is not returned in the enqueue api response. Just the message ID
    2. Where would we execute the query referenced in this thread to derive the execution id?
     
    We are working to develop an integration to dynamics and would like to monitor the status of a job to ensure that partial failures are caught and addressed in real time. 
  • Suggested answer
    msft enthusiast Profile Picture
    6 on at
    How to get Execution ID/Job ID of Recurring Integration Job using ODATA API call
    In D365 F&O, there is an API DataManagementDefinitionsGroups-GetExecutionIdByMessageId. It takes MessageId as parameter and returns the JobId. Here is the syntax if you are using Postman.
     
     
    POST /data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetExecutionIdByMessageId
    BODY
    {
        "_messageId":"<messageId>"
    }
     
    If you are using Logic Apps Standard Edition, please search for "Fin & Ops Apps (Dynamics 365) and select "Execute action". In the dropdown for Action, please select DataManagementDefinitionsGroups-GetExecutionIdByMessageId
     
  • CU12091114-0 Profile Picture
    4 on at
    How to get Execution ID/Job ID of Recurring Integration Job using ODATA API call
    thanks @msft_enthusiast !
    that's marvelous, working like a charm !
     
    this API route is definitively a bit hidden :)
  • Suggested answer
    KennethH Profile Picture
    9 on at
    How to get Execution ID/Job ID of Recurring Integration Job using ODATA API call
    Only issue is DataManagementDefinitionsGroups-GetExecutionIdByMessageId will require an up-to-date MessageId. I quickly discovered that each time the job ran successfully, a new success message was created:

     
    To resolve this, I went with an OData call to data/DataManagementExecutionJobs which returned the last 5 execution Ids.
    Reply Format:
    [{ "@odata.context":"https://(My-Instance).operations.dynamics.com/data/$metadata#DataManagementExecutionJobs","value":[ { "@odata.etag":"W/\"JzE0ODU0MDMxMTQsNTYzODc2NzM4NSc=\"","JobId":"PIM_Products-2024-10-24T11:57:53-9C6FA07DE83E47E39A6F71B88401D5B7","Description":"Export Products" },{ "@odata.etag":"W/\"JzQ0MzQ0MDgxMCw1NjM4NzcwNzg2Jw==\"","JobId":"PIM_Products-2024-10-26T19:00:03-03E81243D335437F9E2ABC0DC039DABB","Description":"Export Products" },{ "@odata.etag":"W/\"JzE2NTc3MDM0MjgsNTYzODc3MjU5Myc=\"","JobId":"PIM_Products-2024-10-24T11:57:07-0EFDBBD231BE4A6EAC0D2CA855C7CA5E","Description":"Export Products" },{ "@odata.etag":"W/\"JzgwNzY4MDY1OSw1NjM4NzcyNjQ5Jw==\"","JobId":"PIM_Products-2024-10-24T19:00:02-495364B57D5644F29093BFAD1243E04B","Description":"Export Products" },{ "@odata.etag":"W/\"JzExMDE4ODY2MzAsNTYzODc3MjgzNic=\"","JobId":"PIM_Products-2024-10-25T19:00:05-2B2D01378D424021812A94CFA93047A9","Description":"Export Products" } ] }]
    If you go this route you'll need a $filter= parameter to narrow the result set down to the DMF job you're interested in

  • Anthony Blake Profile Picture
    2,823 Super User 2025 Season 2 on at
    How to get Execution ID/Job ID of Recurring Integration Job using ODATA API call
    Hi
     
    Take a look at the 2 working examples here:
     
     
    The calls are:
    {{resource}}api/connector/enqueue/{{recurring_activity_id}}?entity={EntityName}
    {{resource}}data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetExecutionIdByMessageId
     
    Entity message id is taken from the Enqueue response body.
     
    The body for GetExecutionIdByMessageId:
    {
        "_messageId":{{entity_message_id}}
    }
     
     
    Anthony
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,771

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 806 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 542 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans