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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

How to call a custom Business Central web service (unbound action) from Power Automate?

(8) ShareShare
ReportReport
Posted on by 147

Hi,
Is there a way to call a web service through Power Automate?
Here’s the problem:
In Business Central, the bound action doesn’t support typical parameters. So, I created an unbound action, published it as a web service, and it works fine when tested directly.The issue is: how can I call this in Power Automate?
For example, I need to call a service like this:

https://api.businesscentral.dynamics.com/v2.0/<tenant-id>/<environment>/ODataV4/ADVSearchAPI_SearchVendors?company='SampleCompany'
 

With a body like this:

{
"searchText": "World Traders"
}
 

Any guidance would be appreciated.

I have the same question (0)
  • Suggested answer
    Sohail Ahmed Profile Picture
    11,136 Super User 2025 Season 2 on at
    This might help you
     
     
     
    ✅ Mark this as the verified answer if helpful.
  • Suggested answer
    Sumit Singh Profile Picture
    10,079 on at
    Yes. Use Power Automate’s HTTP with Microsoft Entra ID (Azure AD) action, or build a Custom Connector. The built‑in BC connector doesn’t invoke custom unbound actions directly.
     
    Below are few suggestions and you can check over Sandbox environment first.

    Option A – HTTP with Microsoft Entra ID (service principal)
    1) App registration
    - Register an app in Entra ID.
    - API permissions: Dynamics 365 Business Central (Application) → API.ReadWrite.All (and/or Automation.ReadWrite.All). Grant admin consent.
    - In Business Central (Entra ID Applications page), grant the app permission sets it needs.

    2) In your flow
    - Add “HTTP with Microsoft Entra ID”.
    - Connection:
      - Azure AD resource URI (audience): https://api.businesscentral.dynamics.com
      - Tenant ID, Client ID, Client secret: from your app.

    - Action setup:
      - Method: POST
      - URI:
        https://api.businesscentral.dynamics.com/v2.0/<tenant-id>/<environment>/ODataV4/ADVSearchAPI_SearchVendors?company='SampleCompany'
        (Alternatively, drop the query and add header X-Company: SampleCompany to avoid quote issues.)
      - Headers:
        - Content-Type: application/json
        - Accept: application/json
        - X-Company: SampleCompany (preferred)
      - Body:
        {
          "searchText": "World Traders"
        }

    - Use body('HTTP')?['value'] to read the return (it’s Edm.String in your screenshot). If you want it typed, add a Parse JSON step with:
      { "type":"object", "properties": { "@odata.context":{"type":"string"}, "value":{"type":"string"} } }

    Option B – Custom Connector (delegated sign‑in)
    - Security: OAuth 2.0
      - Auth URL: https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize
      - Token URL: https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token
      - Scope: https://api.businesscentral.dynamics.com/.default
    - Host: api.businesscentral.dynamics.com, Base URL: /v2.0/{tenant}/{environment}/ODataV4
    - Define an operation:
      - POST /ADVSearchAPI_SearchVendors
      - Query: company (string)
      - Body: searchText (string)

    Tips
    - If company has spaces, prefer the X-Company header instead of ?company='…'.
    - Parameter names in the JSON body must match your AL action parameter names (case sensitive).
    - Handle 429/503 by enabling retry policy on the HTTP action.
    Note: This answer is based on my understanding, with Microsoft Copilot helping me organize and polish the wording.
    Mark the Boolean true “Does this answer your Question” if this was Helpful.
  • Suggested answer
    YUN ZHU Profile Picture
    95,331 Super User 2025 Season 2 on at
    You can use a more primitive method, which is more complicated but effective.
    More details:
    Using OAuth 2.0 to connect Business Central APIs and Web Services in Power Automate – OAuth in HTTP action
     
    Thanks.
    ZHU
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    20,275 Super User 2025 Season 2 on at
  • Suggested answer
    Ramesh Kumar Profile Picture
    7,527 Super User 2025 Season 2 on at
    I hope below can help you
     
     
     
    Thanks
    Ramesh
     
    If this was helpful, please check the "Does this answer your question?" box and mark it as verified.

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

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans