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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

How to test custom service in my local DevVM ?

(0) ShareShare
ReportReport
Posted on by 558
Hi guys,
 
As a beginner in create custom services in D365 FO, may I know how to test it in my Dev VM ?
Also would like to know how to debug my program when something need to investigate ?
 
Need help for some guidance.
 
Thanks,
I have the same question (0)
  • Suggested answer
    Mohit Rampal Profile Picture
    12,573 Moderator on at
    Hi Ken, You can configure Postman and test your custom web service in your Devbox. Postman application can be downloaded on any machine or web application also works.
     
    Check this article 
     
    https://www.linkedin.com/pulse/microsoft-dynamics-365-finance-operation-custom-web-service-ahmad?utm_source=share&utm_medium=member_android&utm_campaign=share_via
  • Necklace Quote Profile Picture
    2 on at
    I have one question in common. I'm trying to solve this problem, but I can't
  • Layan Jwei Profile Picture
    8,282 Super User 2026 Season 2 on at
    Hi Ken,
     
    There are mutiple ways to test your custom service. I will mention two options:
     
    1. You can add  C# projects in your x++ solution from gitHub.
     
    It has two options JSON and SOAP.
    If you want SOAP, then take authentication utility, soap utility and soap console application.
    If you want JSON, take authentication utility and JSON console application.
     
    Once you add the desired projects to your solution, and amend them to match your custom service objects. Then you can set the console application as a start up object and put break points in it, then click start to debug. After that you can attach iisexpress -- in this case you'll be able to debug both x++ and c#
     
     
    2. You can test your custom service via postman as mohit said. Once you finish your custom service development, you can put the url in postman, define the body to include the contract parameters fields you want. 
    To debug it, click attach process iisexpress, then go to postman and call the custom service url, the debug will be catched
     
    Thanks,
    Layan Jwei
  • Ken Manhattan Profile Picture
    558 on at
    Hi Layan & Mohit,
    Thanks.
     
    I tried to setup according to the help. I've managed to get the token. But during call (send) request, I hit error "Cloud Agent Error: Couldn't resolve host. Make sure the domain is publicly accessible or select a different agent"
     
     
    Here is my setup, just to inform this is the combination of few resources including the one that shared just now :
     
    1. I created my App Registration, and record the client id, tenant_id, client_secret. (one question here is in some resource it is specified there is no need to specify redirect URI, is that correct?)
       
     
    2. In D365 FO, go to System Administration > Azure AD applications
        
     
    3. In the Postman, I'm add new request to get the token like below and retrieve the token :
        
     
    4. Create new collection, 1st, go to Authorization then choose type : BearerToken, then paste the token from previous step, 2ndly, go to variables add variable for baseUrl to https://usnconeboxax1aos.cloud.onebox.dynamics.com/
    5.  Testing by create new request under this collection, and call OData, but retrieve the error :
         
     
    For the variable baseURL, I noticed already filled in by the correct URL ->
     
    May I know what is wrong ?
     
    This is run inside a VM, but based on the blogs2 that given, I don' t think this is a problem, right ?
     
    Thanks,
     
     
     
  • Layan Jwei Profile Picture
    8,282 Super User 2026 Season 2 on at
    Hi Ken,

    I thought you are trying to call the custom service but now you switched to oData?

    I think it's an issue with postman, maybe try to download Postman's desktop agent as it shows in your error.

    Let me know if it works after you do so.

    Thanks,
    ​​​​​​​Layan Jwei
  • Ken Manhattan Profile Picture
    558 on at
    Hi Layan,
     
    No, I'm still gonna create custom service. I'm only testing Postman can work or not with my FO, by using the standard object which obviously their OData. Will that be different ? I mean call OData and call custom service ?
    I'm sorry I'm just new for working with API.
     
    Thanks.
  • Layan Jwei Profile Picture
    8,282 Super User 2026 Season 2 on at
    Hi Ken,
     
    No it shouldn't be different but just so that the discussion stays related to the question.
     
    Did it work with you at the end?
     
    Thanks,
    Layan Jwei

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288 Super User 2026 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 276 Most Valuable Professional

#3
Anton Venter Profile Picture

Anton Venter 225 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans