Azure / azure-quickstart-templates

Azure Quickstart Templates
https://aka.ms/azqst
MIT License
14k stars 16.1k forks source link

Administrator (SQL) login created, even when property not included #13691

Open kwc-dev opened 9 months ago

kwc-dev commented 9 months ago

SQL server with Azure AD-only authentication

Issue Details

Looks like that the property administratorLogin (in the properties block) is included automatically behind the scenes even though when not specifying it.

Why is this included? The value is set to CloudSA****. Is this mandatory? Possible to exclude or remove it? Or is it even possible to delete/disable it?

Repro steps

  1. Deploy resource with this template
  2. Go to Azure and check the JSON/template of this resource (automation -> export template)
  3. The property administratorLogin (which is not included) can be seen
mrajess commented 7 months ago

https://learn.microsoft.com/en-us/azure/azure-sql/database/authentication-aad-configure?view=azuresql&tabs=azure-powershell#microsoft-entra-admin-with-a-server-in-sql-database

"Each logical server in Azure (which hosts SQL Database or Azure Synapse) starts with a single server administrator account that is the administrator of the entire server."

https://learn.microsoft.com/en-us/azure/azure-sql/database/authentication-azure-ad-only-authentication?view=azuresql&tabs=azure-cli

"SQL authentication is disabled when enabling Microsoft Entra-only authentication in the Azure SQL environment, including connections from SQL server administrators, logins, and users. Only users using Microsoft Entra authentication are authorized to connect to the server or database."

I believe this is how Azure SQL Server is intended to function. If you were to try and login with SQL auth it should fail. This is not an issue with the template itself. I believe this issue should be closed.