Business Central web services published, secured and kept fast
Business Central web services let outside programs read and write data. They expose pages, queries and codeunits as OData or SOAP endpoints. We set them up from the Web Services page and secure them with Microsoft Entra ID. We fix slow or failing feeds to Excel and Power BI. And we advise when an older interface should move to API pages.
Last updated
How Business Central web services are published
Inside Business Central, there is a page called Web Services. Each line names an object and gives it a service name. It also carries a Published checkbox. So when you tick the box, the system makes a URL. Through it, outside tools can reach that page, query or codeunit.
A published page behaves like the page itself. Fields, validation and permissions all apply. A published query returns read-only data. It is a good source for reporting tools. A published codeunit exposes its functions for a caller to run. Publishing is easy. However, the list grows untidy.
Go through your published list →
- ✓Pages for read and write
- ✓Queries for read-only data
- ✓Codeunits for functions
- ✓Service name per object
- ✓Generated OData and SOAP URLs
OData, SOAP and API pages for Business Central web services
OData is a REST style protocol. It returns JSON and supports filtering, sorting and paging in the URL. For instance, Excel, Power BI and most modern tools speak it natively. SOAP is an older XML protocol. But you still find it in interfaces written for earlier NAV versions. In addition, some enterprise middleware expects it, because it wants a formal service description.
API pages are the third option. Microsoft recommends them for new integrations. They are stable, versioned contracts. A published UI page changes whenever someone alters the screen. However, our usual advice is simple. Keep working OData feeds for reporting. Then build new integrations on API pages. Plan a way off SOAP.
Choose the right protocol →- ✓Reporting feeds: OData queries
- ✓New integrations: API pages
- ✓Legacy middleware: SOAP for now
- ✓Edit in Excel: OData pages
- ✓Unattended jobs: service accounts
Securing Business Central web services access
Business Central online requires OAuth through Microsoft Entra ID for web service calls. The older method of a user name plus a web service access key no longer works online. Because of that, it is the most common reason a long-standing interface suddenly stops. Each caller needs an app registration or a signed-in user.
Permission sets control what a caller may touch, exactly as for a person. We create a dedicated identity for each external system. It gets only the objects it uses. We also remove published services nobody calls any more. Also, an unused endpoint offers no benefit. It is one more door to keep locked.
Tighten web service security →- ✓OAuth for every caller
- ✓Dedicated identity per system
- ✓Least-privilege permission sets
- ✓Unused services unpublished
- ✓Access documented by owner
Making slow web services fast again
A feed that once took seconds can slow to a crawl as data grows. For example, the usual cause is a published card or document page read row by row. Every calculated field and page trigger fires for each record. After all, pages are built for people who look at one screen. They are not built for bulk extraction.
The fix is normally to read through a query object or an API page. It selects only the columns you need. Then we filter on the server instead of downloading everything. Telemetry shows the calls that take longest. We rewrite those first. Where it helps, we schedule heavy extracts outside working hours.
Fix a slow data feed →- ✓Queries in place of pages
- ✓Only the columns required
- ✓Server-side filters
- ✓Paging for large sets
- ✓Telemetry on long calls
Our work on Business Central web services
A typical engagement starts with an audit of the Web Services page. We look at what is published, who calls it, how often and with which identity. Then we tidy up, fix authentication and tune slow endpoints. Finally, we write down each remaining service with its owner. Fragile interfaces get a replacement plan.
We meet three pitfalls most. First, one is an interface tied to one employee's account. Second, another is a SOAP client nobody can change. Third, a service is published from a page that was later customized, which silently altered the output. In the end, you get an endpoint register, the new or repaired services and a test script. Use the script to check them after updates.
Book an endpoint audit →- ✓Register of published endpoints
- ✓Caller and owner per service
- ✓Repaired authentication
- ✓Replacement plan for SOAP
- ✓Post-update test script
Business Central web services questions answered
What are Business Central web services?
They are pages, queries and codeunits made reachable from outside the system over OData or SOAP. You list and switch them on from the Web Services page. Reporting tools, Excel and integrations with other software use them.
Is SOAP still supported?
SOAP endpoints still work. But Microsoft advises building new work on OData and API pages. It has signaled that SOAP is on the way out. If you depend on a SOAP interface, plan its replacement now.
Why did our web service stop authenticating?
The likely reason is basic authentication. Business Central online accepts only OAuth through Microsoft Entra ID. So it refuses a client that still sends a user name and web service access key. You must change the client so it requests a token.
What is the difference between Business Central web services and APIs?
Both use the same underlying protocol. An OData web service is any page or query you publish. Its shape follows that object. An API page is built for integration. It is versioned. It does not depend on how screens are laid out for users. That is the key difference for Business Central web services.
Can Power BI use web services as a data source?
Yes. Power BI's Business Central connector lists published web services and API pages as tables. For good refresh speed, we recommend publishing queries or API pages shaped for reporting. Do not point Power BI at ordinary list pages.
Book a discovery call
Let's talk through your move to Business Central.
A focused call with a senior consultant. We learn how your business runs today, give you an honest view on whether Business Central fits, and outline scope and next steps before you commit to anything.
What happens after you send the form