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 :
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?

I have the same question (0)
  • Martin Dráb Profile Picture
    239,385 Most Valuable Professional on at

    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.

  • agneum Profile Picture
    150 on at

    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

  • Deekshit Addepalli Profile Picture
    Microsoft Employee on at

    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?

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 689

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 606 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 356

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans