community postAL Developmentcommunity - not Microsoftreviewed - checked by Opus

Dynamics 365 Business Central: Automatically enable Allow HttpClient Requests after custom extension/app installation

This post explains how to automatically enable the Allow HttpClient Requests setting for custom extensions during installation using an install codeunit, avoiding the need for manual configuration in each environment.

post Dynamics 365 Lab

Yun Zhu · 2025-06-26 · 425 words · about 2 min

"It's therefore important that you check for this in your AL code."

Key points

  • Apps calling external services through HttpClient need Allow HttpClient Requests enabled in Extension Settings, per app including library apps
  • If the setting is off, calls can fail in the platform and users get a prompt asking whether to allow the request
  • Choosing Allow Always enables the option, but that has to happen manually in every environment
  • The setting lives in system table NAV App Setting, so an install codeunit can read the current module info and set the flag on install

Quotes

  • “It’s therefore important that you check for this in your AL code.” (Highlights the need to handle HttpClient request failures due to permission issues in extension development)
  • “This setting must be enabled for each app/extension, including library apps.” (Explains why automatic enablement during installation is needed to avoid manual repetition across environments)
  • “This will automatically enable Allow HttpClient Requests after installation.” (Demonstrates the practical solution using install codeunits to streamline extension deployment)

AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

  • table “NAV App Setting”
  • codeunit “ExtensionHandler”

Not found in BC28-30: table “NAV App Setting”, codeunit “ExtensionHandler”.

Context

  • Features: HttpClient data type, Extension Settings, Allow HttpClient Requests, Install codeunit, External service integration

Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.