Change of authentication from Windows to NavUserPassword19 lnov2019

Category: AL Development

Change of authentication from Windows to NavUserPassword

Dynamics 365 Business Central TM (Navision) - Changing the authentication method from Windows to NavUserPassword in some steps.

  1. It is very important preassumption: on-premises installations must ensure that clients and Business Central Server are configured to the same login type.
  2. In the first step we change the settings at the server level. These can be done either through the Business Central Server Administration tool of the Business Central Server Administration. In our example, the first option is used.

Dynamics 365 Business Central (Navision) - Authentifizierungsartänderung durch Server Administration

  1. For NavUserPassword authentication we need a certificate. For purposes of our example, we generate a self-signed certificate from Microsoft Gallery.

Self-signed Zertifikat für Dynamics 365 Business Central (Navision) Authentifizierung

  • Download and on extract e.g. on the desktop the zip file: New-SelfSignedCertificateEx.ps1
  • nvoke Powershell ISE as an administrator and use the commandlet to run the commandlet from the folder where the file is extracted, e.g.: Import-Module C:\Users\Konrad Seccount\Desktop\New-SelfSignedCertificateEx.ps1
  • If executing scripts on your system would be disabled, write an additional commandlet: Set-ExecutionPolicy Unrestricted
  • Create the certificate: New-SelfSignedCertificateEx -Subject "CN=Seccount_REST" -IsCA $true -Exportable -StoreLocation LocalMachine

Dynamics 365 Business Central (Navision): Zertifikate generieren für die Authentifizierung via NavUserPassword

  1. Save the certificate thumbprint in Dynamics 365 Business Central Server:

Dynamics 365 Business Central (Navision) - Den Zertifikat-Thumbprint speichern

  1. Add the certificate to the Trusted Root Certification Authority
  • Open Komputerzertifikate Verwalten via the Windows search box.
  • Assign rights in the certificate to the user who is being used to the server.

Rechte im Zertifikat zuweisen - Dynamics 365 Business Central (Navision)

  • Add Certificate to Vertrauenswürdige Stammzertifizierungsstellen.

Vertraenswürdige Stammzertifizierungsstellen - Dynamics 365 Business Central (Navision)

  1. Now we have all settings on server level. It is time to update settings on Clients. This is done by using two configuration parameters in the navsettings.json file for the Business Central Web Server. Usually these are stored here: c:\inetpub\wwwroot\BC150
  • Change ClientServicesCredentialType from Windows to NavUserPassword.

Dynamics 365 Business Central (Navision) - ClientServicesCredentialType in navsettings.json

  • Adjust the DnsIdentity parameter and write off the new CN name of the certificate.

Dynamics 365 Business Central (Navision) - DnsIdentity in navsettings.json

  1. To update any new values ​​that call Internet Information Services (IIS) (Internetinformationsdienste (IIS))and restart the server.

Dynamics 365 Business Central (Navision) - Internetinformationsdienste (IIS)

  1. Restart the Business Central Service Service. New authentication should work now.

Dynamics 365 Business Central (Navision) - NavUserPasswort Loginfenster

Dynamics 365 Business Central (Navision) - NavUserPasswort Benutzer

Dynamics 365 Business Central TM (Navision) Developer and Consultant View Konrad Buczkowski's LinkedIn profile Konrad Buczkowski