---
id: post/jpearson-blog/1601
type: post
title: Integration with Azure Static Web Apps from Business Central
summary: This post explains how to integrate an Azure Static Web App with Business Central by using the WebPageViewer control add-in and the window.postMessage API to enable bidirectional communication between AL code and a hosted web application.
tier: community
language: en
tags:
  - azure static web apps
  - webpageviewer
  - postmessage
  - iframe communication
  - web app integration
  - control add-in
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-10-08T01:55:57.608Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 7105b7cfc00aea271763883aae0e014c0681eae76121d18d18eeafb738381e9d
evidence:
  - kind: blog
    url: https://jpearson.blog/2026/03/20/integration-with-azure-static-web-apps-from-business-central/
    title: Integration with Azure Static Web Apps from Business Central
    date: "2026-03-20"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://jpearson.blog/2026/03/20/integration-with-azure-static-web-apps-from-business-central/
    title: Integration with Azure Static Web Apps from Business Central
    date: "2026-03-20"
    commit: null
    t: null
    quote: This is the scenario that we have on the BC web client page. The WebPageViewer control add in loads its content inside an iframe.
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "1601"
source_id: jpearson-blog
source_name: James Pearson
url: https://jpearson.blog/2026/03/20/integration-with-azure-static-web-apps-from-business-central/
published_at: "2026-03-20T12:50:19.000Z"
author: James Pearson
full_text: false
words: 879
quotes:
  - text: This is the scenario that we have on the BC web client page. The WebPageViewer control add in loads its content inside an iframe.
    why_it_matters: Establishes the core architecture where the web app runs in an iframe context, enabling message-based communication with AL code
code_objects_mentioned:
  - other WebPageViewer
  - other Microsoft.Dynamics.Nav.Client.WebPageViewer
systems:
  - integration
  - development
  - platform
versions_mentioned: []
preview:
  embeddable: true
  frame_url: https://jpearson.blog/2026/03/20/integration-with-azure-static-web-apps-from-business-central/embed/
  image: https://jpearson.blog/wp-content/uploads/2026/03/image.png
  image_alt: null
  image_w: 1003
  image_h: 645
  site_name: James Pearson
  favicon: https://jpearson.blog/wp-content/uploads/2018/09/cropped-semicolon.jpg?w=32
  probed_at: "2026-10-07T11:50:26.261Z"
---

# Integration with Azure Static Web Apps from Business Central

[Read the post](https://jpearson.blog/2026/03/20/integration-with-azure-static-web-apps-from-business-central/) · James Pearson (James Pearson) · 2026-03-20 · 879 words · tier community · reviewed (checked by Opus)

> This post explains how to integrate an Azure Static Web App with Business Central by using the WebPageViewer control add-in and the window.postMessage API to enable bidirectional communication between AL code and a hosted web application.

## Key points

- WebPageViewer control add-in shows hosted web content inside an iframe on a Business Central page
- window.postMessage carries messages both ways between AL code and the embedded web app
- AL side calls SubscribeToEvent with the expected origin, Navigate to the URL, PostMessage to send, and handles replies in the Callback trigger
- Web app listens with addEventListener for message events and replies via window.parent.postMessage with a target origin
- The app must be served over SSL; with a self-signed emulator certificate it loaded but could not send messages back to BC, which worked once deployed to Azure Static Web Apps

## Quotes

- "This is the scenario that we have on the BC web client page. The WebPageViewer control add in loads its content inside an iframe." (Establishes the core architecture where the web app runs in an iframe context, enabling message-based communication with AL code)

## 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.

- other "WebPageViewer"
- other "Microsoft.Dynamics.Nav.Client.WebPageViewer"

## Context

- Features: WebPageViewer control add-in, window.postMessage API, SubscribeToEvent method, Navigate method, PostMessage method, Callback trigger, Azure Functions backend, Application Insights

Source: James Pearson, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
