web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Business Central forum

Configuring Office 365 Single Sign On

(0) ShareShare
ReportReport
Posted on by

Hello,

There have been some changes in this area worthwhile to mention. The below does apply to Dynamics NAV 2018 and Dynamics 365 Business Central On Premise release. There are a couple of values and keys which are important. You can find these in several files. If you require help from Microsoft CSS (support), please ensure these files have been collected and added to the support request you did raise with them.

1. The json file / manifest file or the settings in the Azure AD App
2. The navsettings.json file in IIS
3. The customsettings.config file of the relevant NST Service
4. The clientusersettings.config file of the relevant WinClient
An example of an Azure AD app does look like this (important values removed):

3531.1.png
If you click on Manifest, it will open the manifest file. An example of an Azure AD app manifest file does look like this (important values removed):

2744.2.png
In the first picture, you will find the "Application ID". This is similar to the "appid" in the manifest file. The value for this needs to go in the customsettings.config file where the relevant keyname is now called AzureActiveDirectoryClientId. Then we do see in the manifest file the keyname "identifierUris". This is actually the wtrealm value that can be found in the clientusersettings.config file as part of the AcsUri keyname and can be found in the customsettings.config file as part of the WSFederationLoginEndpoint keyname. So you do have to write these down in notepad or any other word processor. 

If you want Edit in Excel to work, then the following key should be switched from false to true: oauth2AllowImplicitFlow. That key can only be found in the manifest file. Next is the "replyUrls" keyname. For each instance (Web / Win), you must have two:

1. PublicWebBaseUrl (e.g. (https://nav.yourbusiness.onmicrosoft.com/nav/)
2. PublicWebBaseUrl/signin (https://nav.yourbusiness.onmicrosoft.com/nav/signin)
 
NOTE: due to a bug in Dynamics 365 Business Central RTM release, you must use lower chars for the NST instance name
 
With these values in notepad, you can configure the NST via  the customsettings.config file (again use lower chars for NST Instance names). Important values replaced with sample values: 

  <add key="PublicWebBaseUrl" value="https://nav.yourbusiness.onmicrosoft.com/nav/" />
  <add key="ClientServicesFederationMetadataLocation" value="login.windows.net/.../FederationMetadata.xml" />
  <add key="ServicesCertificateValidationEnabled" value="true" />
  <add key="DisableTokenSigningCertificateValidation" value="true" />
 
  <!--
    "AppIdUri"
    See above for the "Application ID" to be retrieved the Azure App or the "appid" to be retrieved from the manifest file. 
  -->

  <add key="AppIdUri" value="" />
 
  <!--
    "WSFederationLoginEndpoint"
    See above for the "identifierUris" to be retrieved from the manifest file as it does come after wtrealm=. After wreply,
    we have to use the "PublicWebBaseUrl". Note that these must match. If you specify a port within the PublicWebBaseUrl,
    it must also be written in the value for the "WSFederationLoginEndpoint".
  -->

  <add key="WSFederationLoginEndpoint" value="login.windows.net/.../wsfed;<guid>>%26wreply=https://nav.yourbusiness.onmicrosoft.com/nav/" />
 
  <!--
     "AzureActiveDirectoryClientId"
     See above for the "Application ID" or the "appid"
   -->

  <add key="AzureActiveDirectoryClientId" value="" />

For the WebClient, there is the navsettings.json. Here are most important keys. Important values replaced with sample values: 

                           "//ServerInstance":  "Name of the Microsoft Dynamics NAV Server instance to connect to (for client) or listen on (for server).",
                           "ServerInstance":  "",

                           "ClientServicesCredentialType":  "AccessControlService",

                           "//ClientServicesPort":  "The listening TCP port for the Microsoft Dynamics NAV Server. This is part of the server\u0027s URL. Valid range: 1-65535",

                           "ClientServicesPort":  "",

                           "//ManagementServicesPort":  "The listening TCP port for the Microsoft Dynamics NAV management endpoint. Valid range: 1-65535",

                           "ManagementServicesPort": "" ,

                           "DnsIdentity":  "*.yourbusiness.onmicrosoft.com",

 

For the WinClient have a look at the following keys. Important values replaced with sample values: 

    <add key="Server" value="" />

    <add key="ClientServicesPort" value="" />

    <add key="ServerInstance" value="" />

    <add key="ClientServicesCredentialType" value="AccessControlService" />

    <add key="ACSUri" value="https://login.windows.net/yourbusiness.onmicrosoft.com/wsfed?wa=wsignin1.0%26wtrealm=https://yoursbusiness.onmicrosoft.com/<<guid>>%26wreply=https://nav.yourbusiness.onmicrosoft.com/nav/" />

    <add key="AllowNtlm" value="true" />

    <add key="ServicePrincipalNameRequired" value="False" />

    <add key="ServicesCertificateValidationEnabled" value="true" />

    <add key="DnsIdentity" value="*.yourbusiness.onmicrosoft.com" />

 

Furthermore, I am using a selfsigned cert with CN name *.yourbusiness.onmicrosoft.com. If you are using Chrome browser you also have to use a Subject Alternate Name (for me as well *.yourbusiness.onmicrosoft.com).

Note that there are more important keys that require a specific values. From our experience in support, these are the ones that generate the most questions for support. Hope this does make things much more clear.

Thank you. 


Categories:
I have the same question (0)
  • Renato Fajdiga Profile Picture
    1,855 on at

    Hi,

    based on that steps, I did configuration on my on-prem installation of business central (CU1 and after that on cu2), but unfortunatelly when I want to login with O365 to the desktop client everything works fine, and when I enter my credentials to the web client I just got never ending reloading of the page of web client.

    Do you have fix for that problem?

    Best regards,

    Renato

  • Verified answer
    Marco Mels Profile Picture
    on at

    No answer required.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Season of Giving Solutions is Here!

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans