Windows Integrated Security Credentials with Azure SQL Server causing ERROR CODE: SEC_ERROR_INADEQUATE_KEY_USAGE

How do I fix "An error has occurred during connection to . Certificate key usage inadequate for attempted operation ERROR CODE: SEC_ERROR_INADEQUATE_KEY_USAGE" with an Azure SQL Databse?

If SQL Server Authentication does not want to be used, in order to maintain active directory login, then Active Directory Integrated authentication on SQL should be used.

It can be verified by taking a look at the authentication methods allowed on SQL Server:

On IIS, click on Connection String:

Change the connection string to “Custom” and paste and edit the following connection string to connect to the desired azure sql server:
Server=tcp:<server>,1433;Initial Catalog=<db name>;Persist Security Info=False;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Authentication=“Active Directory Integrated”;