---
id: change/bcapps/13438
type: change
title: "#13438 Fix Cloud Migration recovery when Tenant Media is unavailable"
summary: Cloud migration recovery now handles Tenant Media read failures gracefully by using a shared try function that logs skipped checks and preserves saved counts, allowing replication to complete and retry instead of aborting.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit hybrid cloud management
  - codeunit tenant media warning
system: administration
review:
  state: reviewed
  by: opus
  at: "2026-11-05T00:53:29.957Z"
  flags: []
generated:
  at: "2026-11-19T00:15:47.846Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: ae8dcabf5f8bb651d676b043ad9681f79958957a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13438
    title: "microsoft/BCApps#13438: Fix Cloud Migration recovery when Tenant Media is unavailable"
    date: "2026-11-04"
    commit: ae8dcabf5f8bb651d676b043ad9681f79958957a
    t: null
    quote: If the count is unavailable, log the skipped check, preserve the saved count, and allow completion handling and replication retries to continue.
links:
  learn: []
  objects:
    - object/codeunit/4001
    - object/codeunit/40024
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/administration/migration-table-mapping
      title: Define Cloud Migration Table Mappings in Business Central
      label: possibly related
      why: touches Codeunit 4001 "Hybrid Cloud Management"
      by: code
    - to: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/administration/migration-manage
      title: Manage Business Central Cloud Migration
      label: possibly related
      why: Describes Cloud Migration Management and managing data migration to Business Central, including recovery and troubleshooting.
      by: model
number: 13438
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13438
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-04T16:44:13Z"
author: onbuyuka
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: Integrations"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 4
  additions: 129
  deletions: 6
  al: 2
apps:
  - HybridBaseDeployment
objects_touched:
  - key: codeunit/4001
    page: codeunit/4001
    type: codeunit
    id: 4001
    name: Hybrid Cloud Management
    app: HybridBaseDeployment
    status: modified
  - key: codeunit/40024
    page: codeunit/40024
    type: codeunit
    id: 40024
    name: Tenant Media Warning
    app: HybridBaseDeployment
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 657194
systems:
  - administration
quote: If the count is unavailable, log the skipped check, preserve the saved count, and allow completion handling and replication retries to continue.
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #13438 Fix Cloud Migration recovery when Tenant Media is unavailable

> Cloud migration recovery now handles Tenant Media read failures gracefully by using a shared try function that logs skipped checks and preserves saved counts, allowing replication to complete and retry instead of aborting.

[Pull request](https://github.com/microsoft/BCApps/pull/13438) · merged into `main` (BC30) on 2026-11-04 by onbuyuka · 4 files (+129 -6), 2 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Shared read-only try function for media counts prevents replication webhook abort when table access fails
- Unavailable counts are logged and skipped rather than causing failure
- Previous media counts are preserved across retry attempts
- Added regression tests for normal comparisons, unavailable counts, and retry scenarios
- No schema or public API changes
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 4001 "Hybrid Cloud Management"](../../objects/codeunit/4001.md), HybridBaseDeployment: modified
- [Codeunit 40024 "Tenant Media Warning"](../../objects/codeunit/40024.md), HybridBaseDeployment: modified

## Context

- Work items: AB#657194
- Labels: AL: Apps (W1), Team: Integrations
- Systems: administration
- From the description: "If the count is unavailable, log the skipped check, preserve the saved count, and allow completion handling and replication retries to continue."

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Define Cloud Migration Table Mappings in Business Central](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/administration/migration-table-mapping) — possibly related: touches Codeunit 4001 "Hybrid Cloud Management"
- [Manage Business Central Cloud Migration](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/administration/migration-manage) — possibly related: Describes Cloud Migration Management and managing data migration to Business Central, including recovery and troubleshooting. (model-linked)

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
