Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

How do I call "ExecuteProcedure" API method using REST or Powershell?

(0) ShareShare
ReportReport
Posted on by 150

The following documentation for connectors shows that it's possible to call an operation called "ExecuteProcedure". Currently I use it in a flow (power automate), but would like to use it in a powershell script as well.

https://docs.microsoft.com/en-us/connectors/dynamicsax/#execute-action


So far I've created an app in Azure, given all D365 API permissions to it and added it to D365 under system administration. I've successfully been able to get a token and retrieve some data from entities with OData. All I need now is the correct Uri, method, body and whatever to call ExecuteProcedure.

Has anyone done something similar or has any ideas on how I can use this connector?

  • Deekshit Addepalli Profile Picture
    on at
    RE: How do I call "ExecuteProcedure" API method using REST or Powershell?

    Are you trying to just make an oData request via Powershell? If so, I think you're on the right path and you would use the Invoke-Restmethod call with the -Uri paramter. So something like this

    Invoke-RestMethod -Uri $ODATA_CALL -Method Get -Headers $headers -ContentType -application/json

    the $headers variable will contain your bearer token. 

    Is this what you're looking for?

  • agneum Profile Picture
    150 on at
    RE: How do I call "ExecuteProcedure" API method using REST or Powershell?

    It is to call an OData service or the API somehow. So it seems I will have to trigger the flow from the script or just use the flow on its own. Thanks

  • Martin Dráb Profile Picture
    231,821 Most Valuable Professional on at
    RE: How do I call "ExecuteProcedure" API method using REST or Powershell?

    Is your goal to trigger Power Automate or to call an OData service? If the latter, forget ExecuteProcedure, because it's a part of Power Automate and not of D365FO. The OData service is covered here.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,978 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,821 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans