topic hubIntegration & APIsofficial - Microsoftreviewed - checked by Opus

Web services security

Web services security in Business Central covers authentication options (basic, OAuth, service-to-service), certificates, supported cipher suites for outgoing HTTPS calls, and network restriction with Azure service tags. It answers questions on securing OData and SOAP endpoints and API integrations.

Path: Integration > Web services > Web services security · tier official · system integration · narrative reviewed (checked by Opus)

Overview

This section explains how to secure access to Business Central web services. The main Web service security page gives best practices and lists the authentication options: basic authentication, OAuth, service-to-service authentication, and certificate-based security. Start there to choose an approach.

Detailed pages follow for each option. The OAuth page covers OAuth 2.0 concepts, user impersonation, service-to-service use, and token lifetimes, and a walkthrough builds a console application that gets tokens through Microsoft Entra ID to call OData. The service-to-service page covers unattended integrations with the client credentials flow. For on-premises, a page covers X.509 certificates and chain trust. Two further pages cover supported cipher suites for outgoing HTTPS calls and the Dynamics365BusinessCentral Azure service tag for firewall and network security group rules.

Key points

  • Authentication options include basic authentication, OAuth, service-to-service authentication, and certificate-based security.
  • OAuth 2.0 for OData and SOAP supports user impersonation and service-to-service scenarios, with access and refresh token lifetime management.
  • Service-to-service authentication uses the OAuth 2.0 client credentials flow for unattended integrations and requires a Microsoft Entra registration.
  • S2S permissions named in the docs include API.ReadWrite.All and Automation.ReadWrite.All; the page references versions 17.0, 18.3, 18.11 and 19.5.
  • The walkthrough builds a console app using Microsoft Entra ID, Visual Studio, delegated permissions, and the OData V4 endpoint.
  • On-premises security certificates use X.509 with chain trust or peer trust, including Server and Client Authentication and SSL for web services.
  • The Dynamics365BusinessCentral Azure service tag restricts network access to and from Business Central through firewall and network security group rules.
  • A separate page lists the TLS protocols and cipher suites supported for outgoing HTTPS calls to external APIs.

Learn pages

  • Supported cipher suites: Lists the cipher suites that are supported for external APIs called from Business Central.
  • Use Azure security service tags: List of Azure service tags for Dynamics 365 Business Central
  • Using OAuth to authenticate Business Central Web Services: Learn how to set up OAuth for Business Central web services, including OData and SOAP, and secure your integrations.
  • Using Security Certificates with Business Central on-premises: Learn how to use security certificates to help secure connections with Business Central.
  • Using Service to Service Authentication: Service-to-service authentication enables external services to connect as an application, without impersonating normal users.
    • Status: S2S authentication generally available for Business Central automation APIs online version 17.0 and on-premises versions 18.11 and 19.5 and later.
    • Status: S2S authentication generally available for Business Central APIs v1.0 and v2.0 online version 18.3 and on-premises versions 18.11 and 19.5 and later.
    • Service-to-service authentication uses OAuth 2.0 Client Credentials flow for integrations running without user interaction; supports scheduled tasks on version 21.2 and later.
    • Step: Register Microsoft Entra application with unique name, specify supported account types, optionally add redirect URI for OAuthLanding.htm file.
    • Step: Create client secret for registered application by selecting Certificates and secrets, New client secret, adding description, selecting duration, selecting Add.
    • Step: Grant API.ReadWrite.All and Automation.ReadWrite.All permissions to Dynamics 365 Business Central API via API permissions, Add a permission, Microsoft APIs.
    • Step: Set up Microsoft Entra application in Business Central by searching Microsoft Entra applications, selecting New, entering Client ID, Description, setting State to Enabled, assigning permissions.
    • Limit: Applications cannot be assigned SUPER permission set; use least-privilege principle and assign only required permissions for integration.
  • Walkthrough: Creating a console application that use OAuth to Authenticate Business Central Web Services (OData and SOAP): Learn how to use OAuth to authenticate Business Central web services (OData and SOAP) through a step-by-step guide
  • Web service security: Get the list of recommendations for how to secure web services in your Business Central solution.

Key facts from Microsoft Learn (CC BY 4.0), in our own words (D106); open the page for the full text.

Videos, posts and code changes

Linked by a Haiku matcher with a grounding quote from the item’s summary (link/topics.ts); machine-generated.

Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.

What Learn documents here 7 Learn pages