Hi everyone,
We have install a D365 server environment in a local VM. We used to publish our extension and add these expose these pages to web service. Using basic authentication(UserName and Web Access Key) to get the Json data. (Document Link) It all works well for online trail D365BC and online sandbox. However, when we try to use D365 server environment in a local VM, it always return a 401 unauthorize error if I choose basic authentication and still use the username and web access key. I have enable the Odata service. It works if I enable NTLM Authentication and use NTLM to do the Authentication. But I want to use the basic authentication(UserName and Web Access Key) and not use the basic API URL to do the integration. What should I do. Thanks in advance!!
Thank you very much Ari,
It is working now.
Just to recap what you mentioned :
Thanks again,
Hi Nissay, for your case, have you tried following :
- Enable "Use NTLM Authentication" in the service configuration
- Then in your postman you need to use ntlm authentication as the authentication method (use the windows username and password to connect).
Using username and Web Access key is being used only if you are using NavUserPassword as the credential type .
Hi,
Please we have the same issue and we cannot access the web service through SOAP UI or POSTMAN with the username and the web access key. we always have the 401 Unauthorized error (our D365BC is hosted locally and we use Windows Credentials as Credentials Type for D365BC).
Have you any idea or have you tried anything else except the one you marked as a solution?
Thanks in advance,
I found the solutin for my issue. docs.microsoft.com/.../how-to--configure-authentication-of-microsoft-dynamics-nav-web-client-users
To enable an authentication method on the Microsoft Dynamics NAV Web client site
On the computer that is running Microsoft Dynamics NAV Web Server components, open Internet Information Services (IIS) Manager.
On the Start menu, in the Search programs and files box, type inetmgr, and then press Enter.
In the Connections pane, under Sites, choose Microsoft Dynamics NAV 2018 Web Client.
Under IIS, double-click Authentication.
In the Authentication pane, enable the appropriate authentication based on the credential type.
For the Windows credential type, enable Windows authentication. If you are using Dynamics NAV apps, you must also enable Anonymous authentication.
For the UserName, NavUserPassword, and AccessControlService credential types, enable both Forms authentication and Anonymous authentication.
To enable an authentication method, choose the authentication method from the list, and then choose Enable in the Actions pane.
For Windows authentication, you must set up an authentication provider. By default, Windows authentication is configured to use the Negotiate and NTML providers, which is sufficient for most installations and no action is required. If the computer that is running Microsoft Dynamics NAV Web Server components and Microsoft Dynamics NAV Server are on different computers, and delegation with Kerberos is configured between the two computers, then the Negotiate provider must be first in the list of providers.
To set up the providers, do the following:
Choose Window Authentication, and then under Actions, choose Providers.
To add a provider, select the provider from the Available Providers list, and then choose Add.
To move a provider in the Enables Providers list, select the provider, and then choose the Move Up or Move Up button.
Choose the OK button.
Restart the web server.
In the Connections pane of IIS Manager, choose the root node for your computer, and then in the Actions pane, choose Restart.
I have updated my post. I could access the data via browser and use VM login. I would like to access use 365 user name and web access key. Thank you so much.
I have update the post and I was able to get the data via browser and use VM login as username and password. I'm not sure how to switch to use 365 username and web access key. Is that because I didn't enable SSL?
VMADMIN is the right username you have in your D365BC sandbox (User Page)?
Are you sure? Or it’s the user that you have to access the VM while BC is configured with NavUserPassword authentication?
Open D365BC, check your user in User page, then use the username without domain and the access key.
Hi Ruinning,
1) Have you tried the username without using the Domain name (Without EDISRV12).
2) If it is not working, check the header response for. it gives sometimes more details on the error.
--
Best Regards,
Thank you for replying. I copied the endpoint from "Web Service" page. It should be no issue. I could successfully get the data by NTLM Authentication. But I want to know whether I could use Basic auth(username and web access key)? Username and Web Access Key works in cloud environment. But 401 unauthorize error in a local VM.
Are you using a correct endpoint? You can use basic auth also in a local VM.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156