web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Error when publihsing an extension: failed with code UnprocessableEntity

(2) ShareShare
ReportReport
Posted on by 79
I'm currently developing a fairly large extension for Microsoft Dynamics 365 Business Central. The project includes various components such as:
  • Reports (RDLC, Excel, Word)
  • Report layouts
  • Codeunits
  • Page modifications
  • And other AL objects
The extension builds successfully without any compilation errors.

However, I'm intermittently encountering an issue when publishing the extension to a Business Central Sandbox (cloud environment). The publishing process sometimes fails with the following error:
[2025-06-05 11:17:14.17] Publishing AL application using launch configuration 'Microsoft cloud sandbox'.
[2025-06-05 11:17:15.36] Authenticated as user '' in tenant ''.
[2025-06-05 11:17:15.36] Targeting Dynamics 365 Business Central.
[2025-06-05 11:17:15.36] Sending request to https://api.businesscentral.dynamics.com/v2.0/Sandbox-Dev/dev/apps?SchemaUpdateMode=synchronize&DependencyPublishingOption=default
[2025-06-05 11:17:45.50] Error: An error occurred while processing the request.
Request ID: 
Session ID: 

[2025-06-05 11:17:45.52] The request for path /v2.0/Sandbox-Dev/dev/apps... failed with code UnprocessableEntity.  
Reason: Publishing failed due to 'Object reference not set to an instance of an object.' The original extensions could not be restored due to the same error.  
Extensions that were previously installed but could not be reinstalled. These should be manually reinstalled. If they are part of your current workspace, you can use the 'Full Dependency Publishing' command.
 
Temporary Workaround
Restarting the affected environment from the Business Central Admin Center allows me to successfully re-publish the extension afterward.
This issue is not tenant-specific—I experience the same behavior on other tenants as well. After some time, publishing fails with the same error, and restarting the environment resolves it temporarily.
 
Request for Guidance
Are there recommended steps I can take to further analyze:
  • Whether this is a code-level issue in the extension?
  • Or whether the problem lies within the target environment(s)?
Any insights, tools, or debugging techniques to help pinpoint the root cause would be greatly appreciated.
Thank you in advance!

Additional Image for Reference (Ignore the 327 problems, they're not substantial as they did not block extension building/pushing previously ):
I have the same question (0)
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,803 Super User 2026 Season 1 on at
     
    Try to use "Full Dependency Publishing" from VS Code.
     
    In Command Palette: AL: Publish with Full Dependencies
     
    Best regards,
    Mohamed Amine MAHMOUDI
     
  • Suggested answer
    Sohail Ahmed Profile Picture
    11,173 Super User 2026 Season 1 on at
  • Suggested answer
    Sagar Dangar, MCP Profile Picture
    813 Moderator on at
    Hi,
     
    Please change"SchemaUpdateMode"::ForceSync and try again
  • Suggested answer
    RockwithNav Profile Picture
    9,097 Super User 2026 Season 1 on at
    This is one of the error with too many possibilities, have faced this once - 
     
    • Missing Dependencies – Required extensions or objects are not referenced or installed.

    • Permission Issues – User lacks required rights to publish or modify objects.

    • App.json Issues – Missing or incorrect fields like id, name, publisher, or version.

    • Dependencies Mismatch – Incompatible or incorrect versions of required apps.

    • Invalid Object IDs – Reuse or misalignment of object IDs with environment.

    • Tenant or Environment Issues – Wrong tenant, or environment doesn't allow extension deployment.

    • Schema Mismatch – Extension fields or tables conflict with existing database schema.

    • Invalid Data Format – Unsupported or malformed values in records or fields.

    • Extension Dependencies – Missing or improperly referenced packages or symbols.




    •  
     
     
  • haryadihart Profile Picture
    50 on at
    Hi I also have experienced the same issue.
    have you know the solution for this issue?
     
    I have been trying Full Dependency Publishing also still got the same error.
  • Gerardo Rentería García Profile Picture
    26,110 Most Valuable Professional on at
  • Suggested answer
    YUN ZHU Profile Picture
    100,212 Super User 2026 Season 1 on at
    I have not encountered this problem in BC26.2. I suggest you upgrade to the latest CU and try again.
     
    Thanks.
    ZHU

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,012 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 986 Super User 2026 Season 1

#3
Teagen Boll Profile Picture

Teagen Boll 659 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans