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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

How to uninstall an extension automatically (And Delete Extension Data) through API

(0) ShareShare
ReportReport
Posted on by 10
Hi,

I've made an extension with some codeunits in AL.

I'm trying to automate the deployment / update (including uninstall of previous version).

Currently I'm able to publish it, uninstalling it, but the files remain. Another question helped me find BC Automation APIs:

Introduction to automation APIs - Business Central | Microsoft Docs

These offer Microsft.NAV.install, Microsft.NAV.uninstall, Microsft.NAV.uninstallAndDeleteExtensionData endpoints.

The second one runs smoothly but files remain at the end. 

And when I try to run uninstallAndDeleteExtensionData, I  get this (I removed the ids)

"{\"error\":{\"code\":\"BadRequest_NotFound\",\"message\":\"No HTTP resource was found that matches the request URI 'api.businesscentral.dynamics.com/.../Microsoft.NAV.uninstallAndDeleteExtensionData?tenant=msweua...&aid=FIN'. CorrelationId: ....\"}}"

What am I doing wrong ? Are there some differences that I should know when I call uninstallAndDeleteExtensionData, compared to uninstall ?

Thank you in advance.

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    95,729 Super User 2025 Season 2 on at

    Hi, It seems that the extension that needs to be uninstalled is not found.

    I have tried to use the API to uninstall the extension, I hope the following information can give you some inspiration.

    https://yzhums.com/6287/

    pastedimage1635471671331v1.png

    https://yzhums.com/12259/

    Hope this will help.

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,238

#2
YUN ZHU Profile Picture

YUN ZHU 773 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 630

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans