Installing Microsoft Dynamics 365 Business Central with AzureSQL

Dynanmics 365 Business Central logo

As described here, it can be kind of a Catch-22 to try to install Microsoft Dynamics 365 Business Central if you don’t have a local SQL Server, but want to use AzureSQL.

Although I know the approach in the before mentioned Kine Info blog post works, I came across a easier solution during my struggles with this issue.

Although the installer setup.exe does not have a “Postpone Server Startup” setting in the GUI, it actually support it.

You just need to create a configuration and hit Save before actually starting the installation. You can do that when you finish filling out all the settings on the setting page (the one with port numbers, database server and database name etc.). After you saved the configuration, close the setup.exe installer.

Now open the XML file you saved, locate the “PostponeServerStartup” setting and change it’s default value of “false” to “true”:

<Parameter ID="PostponeServerStartup" Value="true"/>

Now restart setup.exe and load the configuration – and start the installation. The installer will not try to start the service tier, so it won’t fail that and roll back the installation.

We can only hope that Microsoft at some point will add this option to the setup.exe GUI :-).

2020-02-28 Update: I’ve suggested it to Microsoft. It is not a high priority issue (because of the above described workaround). For anybody interested it has been logged with internal Microsoft ID 346773.

Sendmail/smart host – this time with Microsoft Azure and

FreeBSD logo


As mentioned here, my internet service provider (ISP, Eniig) has announced that they will not provide a SMTP relay host (outgoing Simple Mail Transfer Protocol relay), and on top of that they earlier stated that they will not even setup reverse DNS on my fixed IP. They recommended and it has worked flawlessly since I configured it at described here!

Unfortunately (for them) seems to have raised their prices for their low quantity “Emails To Go”-subscription, and that makes one wonder if one can get it cheaper than DKK 0.02 per e-mail :-).

It seems that if you create a Microsoft Azure account (which is free as long as you don’t use services you need to pay for – well, in fact it is even cheaper than free – they give you some introduction credits you can test their paid services with 🙂 ), you can create a free account with 25,000 free e-mails a month! (even if you need more, they are still way cheaper than

Just like, requires you to use the SMTP submit port (587) and authentication. But we already solved that for as described here, so that should not cause too much hassle :-).

I just did it like this:

Add a API Key on using menu “API Keys” after logging in.
Give it a good name so you know what it is for.
Optional: Create it with “Restricted access” and only grant it permission for “Mail Send” / “Mail Send”.
Make a note of the “API Key” as it will only be shown during creation (you cannot get it afterwards).

Create /etc/mail/access with this contents (terminate it with a line break):       OK
GreetPause:localhost    0

Create /etc/mail/authinfo with one line (terminate it with a line break): "U:root" "I:apikey" "<You SendGrid API Key>" "M:LOGIN"

…replacing values in < > with the API Key you made a note of above.
Hint: You can leave other logins in here for safekeeping if you want to (like your details).
I feel most secure by making this file rw for root only

Run makemap of the two fils to create access.db and authinfo.db-files:

makemap hash access < access
makemap hash authinfo < authinfo

Correct your (whatever it is called on your system). Add these lines:

define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
FEATURE(`authinfo',`hash /etc/mail/authinfo')dnl

Note: You should change this for the sendmail queue runner process, not a SMTP submit service etc.

Compile your file into a file. This is easily done on FreeBSD 🙂

make cf

Restart sendmail. Again – this is easy on FreeBSD

make restart

Also: remember to correct your SPF and similar setups on your domains according to SendGrids documentation. You’ll find SendGrids SPF documentation here!

“External Azure Active Directory” users and Single-Sign-On in Dynamics 365 Business Central

Dynanmics 365 Business Central logo

If you are setting up Single-Sign-On (SSO) for Dynamics 365 Business Central (DBC) and you are only able to authenticate users local to the Azure Active Directory (i.e. non Guest or “External Azure Active Directory” users), then you might have stumbled across the same error as me.

The error manifests itself by allowing you to log in using SSO, but just when the DBC webclient is suppose to open, you get this error:

Your user name or password is incorrect, or you do not have a valid account in Dynamics 365 Business Central.

The problems is that a user with that authentication e-mails IS in fact present in DBC – so the error makes no sense.

Also you will sometimes get a warning in the Event Viewer that the SSO token was valid, but the user could not be found in DBC.

As mentioned the local domains works fine, it is only if you try to add external users and authenticate with those it does not work:

User type: Guest
Source: External Azure Active Directory

I’ve seen this error in Microsoft Dynamics 365 Business Central 2018 fall release with cumulative update 1 and 2.

I’m aware that you – with powershell – can change a User type Guest to a User type Member. I tried it, but the result was the exact same. So “no cigar” for that solution.

After upgrading the platform to the latest Cumulative Update (which is 7 while I’m writing this), the error is completely gone. So there you have your fix :-).

Note: I’ve not tested all the CUs between 2 and 7 to figure out when it was fixed or if there is a entry in the fix list that mentions this – so if you have more knowledge about that, please share by adding a comment.