Morgana
Morgana

Reputation: 337

NTLM authentication for Microsoft Dynamics NAV '18 web service from Node.js fails

I've been struggling with authenticating to NAV '18 from Node server. NTLM authentication works fine from POSTMAN but not from Node. I've already tried using 'Authorization: NTLM', 'username:password' as a header of my request, as well as some NTLM libraries such as httpntlm with no luck.

Is there an actually working example of ntlm authentication with username and password? Changing windows credentials to NAVUserPassword is not an option...

Upvotes: 0

Views: 2504

Answers (2)

Sam
Sam

Reputation: 6122

You can use the httpntlm module I wrote a few years ago:

https://www.npmjs.com/package/httpntlm

var httpntlm = require('httpntlm');

httpntlm.get({
    url: "https://www.url.to.nav.com",
    username: 'username',
    password: 'password',
    workstation: '',
    domain: ''
}, function (err, res){
    if(err) return err;

    console.log(res.headers);
    console.log(res.body);
});

Upvotes: 3

user2728382
user2728382

Reputation: 1

You can create multiple server instances for NAV with the same backend database. I use this for creating an instance for use with Azure Active Directory, without effecting our internal Active Directory based users.

https://learn.microsoft.com/en-us/dynamics-nav/how-to--create-a-microsoft-dynamics-nav-server-instance

Upvotes: 0

Related Questions