Skip to main content
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 69
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 ):
  • Suggested answer
    YUN ZHU Profile Picture
    85,982 Super User 2025 Season 1 on at
    Error when publihsing an extension: failed with code UnprocessableEntity
    I have not encountered this problem in BC26.2. I suggest you upgrade to the latest CU and try again.
     
    Thanks.
    ZHU
  • Gerardo Rentería García Profile Picture
    20,949 Most Valuable Professional on at
    Error when publihsing an extension: failed with code UnprocessableEntity
  • haryadihart Profile Picture
    28 on at
    Error when publihsing an extension: failed with code UnprocessableEntity
    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.
  • Suggested answer
    RockwithNav Profile Picture
    7,241 on at
    Error when publihsing an extension: failed with code UnprocessableEntity
    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.




    •  
     
     
  • Suggested answer
    Sagar Dangar, MCP Profile Picture
    574 on at
    Error when publihsing an extension: failed with code UnprocessableEntity
    Hi,
     
    Please change"SchemaUpdateMode"::ForceSync and try again
  • Suggested answer
    Sohail Ahmed Profile Picture
    4,829 on at
    Error when publihsing an extension: failed with code UnprocessableEntity
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    24,507 Super User 2025 Season 1 on at
    Error when publihsing an extension: failed with code UnprocessableEntity
     
    Try to use "Full Dependency Publishing" from VS Code.
     
    In Command Palette: AL: Publish with Full Dependencies
     
    Best regards,
    Mohamed Amine MAHMOUDI
     

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans