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

Notifications

Announcements

Community site session details

Community site session details

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

Prevent Developers from publishing as Dev

(2) ShareShare
ReportReport
Posted on by 41
Hey there!
 
In our build process we publish to our Customer Environments via automatic Release Pipelines. Sometimes our Developers accidentally publish their apps from VSCode into the Customer Environment. This leads to issues when trying to deploy apps with our release pipelines because you cannot publish an app as PTE if it is already deployed as Dev.
 
I am wondering if there is any way we can disable publishing as Dev in certain environments? Or maybe you have some best practices that you use to prevent this from happening.
 
Any help is appreciated, thanks!
I have the same question (0)
  • Suggested answer
    Wayne R Profile Picture
    8 on at
    Hi there,
     
    To my knowledge there is no silver bullet to block any developer from posting into an environment as a DEV extension. There are however processes that can prevent the accidental deployment to environments that should be deployed as PTE.
     
    Traditionally you have 3 environments, DEV, UAT and PROD. In any BC development repository there is a launch.json file that contains the connection details to each environment the develop wants to deploy to.
     
    As a rule, we do not allow any direct publishing to any environment that is not DEV, so no other environment besides the DEV environment's details are allowed in the launch.json file, debugging takes exception as those details are temporarily added and then removed. If forbidden environments are in the launch.json file, it is easy to select the wrong environment and publish to them by accident.
     
    Alternatively, you can make use of permissions in BC to prevent publishing, but that depends on the environment and who should be allowed to publish extensions. If the user that accidently publishes directly to a Prod environment (as DEV) is meant to have the permissions as they generally deploy extension as PTE, then permissions won't really help. If a user is "SUPER", they will be able to publish. If you remove the "D365 Extension MGT" permission from a restricted user, they will not be able to publish any extensions, DEV or PTE.
     
    Hope this helps.
  • Suggested answer
    YUN ZHU Profile Picture
    97,264 Super User 2026 Season 1 on at
    I’ve looked into this issue extensively, but a viable workaround or solution has yet to emerge.
    For example, preventing insertion during the insertion of an application into table 2000000153 "NAV App Installed App", or adding logic to the OnInstall codeunit, both failed; the Dev extension was still installed.
    If you find a better solution, please share it.
     
    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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,090 Super User 2026 Season 1

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,090 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 1,277 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans