Al: [Solved] Can't publish with "authentication": "UserPassword" from a second machine out of Domain

Created on 3 Feb 2019  路  3Comments  路  Source: microsoft/AL

Describe the bug
We have a Development Business Central OnPremise server joined to our Active Directory Domain.

We can deploy our project from a laptop with Windows 10 (October 2018) joined to the same Domain using domain credentials.

Now we have setting up all the development environment cloning the Git repository in a different laptop with Windows 10 (October 2018) but not-joined to the Domain...

We have changed our launch.json file to "authentication": "UserPassword" but after input our domain-user credentials when try to publish, VSCode throws this Error in console:

[2019-02-03 21:43:22.41] The request for path /bcentral/dev/metadata failed with code Unauthorized. Reason: Unauthorized
[2019-02-03 21:43:22.44] Error: An internal error has occurred

We have tried to deploy with F5 and with Ctrl+F5 and clearing cache credentials several times with the same results.

With these credentials we can log in at web client without any problem in the second laptop and of course can publish from the first laptop joined to the Domain.

Expected behavior
Can deploy from a laptop out of Domain using domain-credentials.

Versions:
AL Language: 2.0.48254
Business Central: ES Dynamics NAV 13.0 (24630) OnPremise

question

Most helpful comment

OK, for all those who, like us, it is not an option to change the value of the Credential types property of the server instance so that your users don't lose the Single Sign On feature or because you are publishing on a Development machine without a valid Certificate...

This problem with development environments can be solved by using the runas /netonly command in a .BAT file

For example:

runas /netonly /user:domain\username "%LOCALAPPDATA%\Programs\Microsoft VS Code\code.exe C:\YourProjectPath\YourExtensionProject.code-workspace"

You will need to type manually your domain-user password, but you will be able to publish extension updates from an out-of-domain machine.

All 3 comments

Hi @JavierFuentes ! UserPassword does not mean that you can now enter your domain credentials in VSCode. That setting refers to the types of credentials defined here: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/users-credential-types . Your server must be configured to accept credentials in this manner before you can publish.

Please use one of the following resources to get more help:
Business Central Community
mibuso forum
Dynamics User Group

OK, for all those who, like us, it is not an option to change the value of the Credential types property of the server instance so that your users don't lose the Single Sign On feature or because you are publishing on a Development machine without a valid Certificate...

This problem with development environments can be solved by using the runas /netonly command in a .BAT file

For example:

runas /netonly /user:domain\username "%LOCALAPPDATA%\Programs\Microsoft VS Code\code.exe C:\YourProjectPath\YourExtensionProject.code-workspace"

You will need to type manually your domain-user password, but you will be able to publish extension updates from an out-of-domain machine.

Thank you for sharing the solution with everybody! I will close this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RonKoppelaar picture RonKoppelaar  路  3Comments

TinaMenezes picture TinaMenezes  路  3Comments

worldofthenavcraft picture worldofthenavcraft  路  3Comments

FSharpCSharp picture FSharpCSharp  路  3Comments

angela2389 picture angela2389  路  3Comments