# Use Microsoft Entra authentication for Business Central on-premises installations
In addition to using Windows and NavUserPassword authentication, you can use Microsoft Entra ID to authenticate and publish in on-premises installations and containers from Visual Studio Code. Using Microsoft Entra ID makes it possible to mimic application lifecycle operations in an on-premises environment, while keeping the cloud-based Microsoft Entra authentication.
To enable Microsoft Entra authentication, make sure to do as follows:
 Use the primaryTenantDomain setting in the launch.json file to specify the URL of the Microsoft Entra organization or company associated with the Microsoft Entra tenant. Learn more in, see Find tenant ID, domain name, user object ID<https://learn.microsoft.com/partner-center/find-ids-and-domain-names> and devenv-json-files.
 On the NST, you must ensure that the server is set up to use Microsoft Entra ID as authentication mechanism. See User Authentication with Microsoft Entra ID for Single Sign-on<../administration/authenticating-users-with-azure-active-directory>.
 If the `Allowed Extension Target Level` setting is set to Cloud, set the server setting ForceExtensionAllowedTargetLevel to true. If the `Allowed Extension Target Level` setting is set to OnPrem, you don't need to set ForceExtensionAllowedTargetLevel. See Configure Business Central Server<../administration/configure-server-instance>.
## Related information
devenv-json-files
User Authentication with Microsoft Entra ID for Single Sign-on<../administration/authenticating-users-with-azure-active-directory>
Find tenant ID, domain name, user object ID<https://learn.microsoft.com/partner-center/find-ids-and-domain-names>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-aad-auth-onprem, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/devenv-aad-auth-onprem/
