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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Making synchronous API calls

(0) ShareShare
ReportReport
Posted on by 676

Hi,

By default the API calls made in CRM dynamics are asynchronous in nature. But I am in a situation where I wish to make synchronous API calls. 

Any suggestion on the same would be highly appreciated.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Clem Profile Picture
    2,541 on at

    Don't forget to check the CRM Rest Builder in order to get the correct query you want :

    2017_2D00_03_2D00_24_5F00_17_2D00_27_2D00_35_2D00_chrome.png

    You can create basic queries to the webapi using XMLHTTP or JQuery in an async or sync way.

    github.com/.../CRMRESTBuilder

  • MattB-MSFT Profile Picture
    Microsoft Employee on at

    All public SDK Calls in CRM SDK ( aside from Imports and Explicit async job types ) are synchronous.

    Which API message / action are you looking at?

    MattB.

  • Verified answer
    tw0sh3ds Profile Picture
    5,600 on at

    You mean webAPI? It's up to you how you call them, you specify this as last parameter in open() function of your XMLHttpRequest:

    var req = new XMLHttpRequest();

    req.open("POST", "url", true/false);

    if you are reffering to OrganizationService - you can't call it asynchronously, but you can always make your call in a separate thread, for example:

    private async Task MakeRequest()

    {

     // do some stuff

     var task = Task.Run(() => CallWebService(myInput));

     // do other stuff

     var myOutput = await task;

     // some more stuff

    }

  • Suggested answer
    Dynamics_Alok Profile Picture
    1,746 on at

    Yes ..You can convert to Synchronous call using Thread or Task.

    Call your API in a Task and wait for completion or Call your API in a Thread and join it .

    It will wait till completion of method execution.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans