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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

When error in API integration for Tier-2 environment, what are the places we need to check ?

(0) ShareShare
ReportReport
Posted on by 397
Hi everyone,
 
I'm new in regards of API integration in D365 FO. Our F&O currently in testing phase with our external party, the test including call D365 custom API from their system. May I know if there are errors when they call our custom API, where I should check to know what is happening ?
 
The F&O on testing I believe currently is a Tier-2 environment. Other thing that I know is we're using Azure API Management for this, but at this moment, this is all I know. 
 
The error that we're facing right now is quire strange because if I test is using my DevBox, all is good. But this means I calling to my local end-point https://usnconeboxax1aos.cloud.onebox.dynamics.com//.
The error message is very general like this :
 /Message/: /An exception occured when invoking the operation - Common Language Runtime detected an invalid program./,
 /ExceptionType/: /InvalidProgramException/,
 /ActivityId/: /62f59b73-943d-0000-5be6-a8633d94da01/
 
And happened to all API that using POST method, which actually before this error happened, all are already tested and run well.
 
Thanks
I have the same question (0)
  • Anthony Blake Profile Picture
    2,966 Super User 2025 Season 2 on at
    Hi Teevo,
     
    Is the error occurring when you connect via APIM but not when you connect directly to the environment?
     
    Thanks
     
  • Teevo Profile Picture
    397 on at
    Hi Anthony,
     
    If my understanding is correct, what you mean by direct is by calling the F&O directly for example this : https://myuat.sandbox.operations.dynamics.com/
     
    While through APIM is this address : https://api-uat-myapps.domain1.gb    
     
    Hope this is correct ? If yes, then actually both having same error. 
     
    As this screenshot:
    Direct :
    APIM :
     
    Thanks.
     
  • Teevo Profile Picture
    397 on at
    I found this old thread, which look similar to my problem :
     
    However may I know where I can see "ms-dyn-infolog header value, " that he talking about ?
     
    Thanks
  • Anthony Blake Profile Picture
    2,966 Super User 2025 Season 2 on at
    I dont think you have an issue with your infolog, but to answer your question the infolog header in the response in the Quesiton you lniked to is in the headers section here:
     
  • Teevo Profile Picture
    397 on at
    Hi,
     
    Thanks, however it looks that I don't have msdyn.infolog what I have is ms-dyn-aid
     

    And also the Server-timing, doesn't look like a big value.

    So, I'm still not sure what is happening and where exactly to check what is the error. Again I checked from my own devbox, no errors fond in any of this API in troubled. So, it is like only happened in my Tier-2. I have restarted the service in LCS, apparently this also didn't help. 

    Am I correct to say, the API services cannot restart ? I think I google something like this and shows me, cannot restart.

  • Teevo Profile Picture
    397 on at
    Some update, I tried to connect to my Tier-2 Database with my DevBox machine, which mean it run my local code while data is from the Tier-2. 
     
    And running script (runnable class) which calling my custom API service (which produce the error in Postman). Turns out it was fine. 
     
    Can I confirm that the error is not because of my code, then ?
     
    is there something wrong with the API Management setting then ? because I can assume, by calling my custom API from runnable class (job), this is not same as what Postman did when calling the custom API, is it ? can I know the different ?
     
    Thanks
     
     

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 678 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 281 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans