As you can read on this forum thread, Azure users have reported through the years that Import-Export operations with a service principal does not work. You always get the error you shared with us.
Unable to import Azure SQL database with Service Principal
Hi,
I have Azure SQL Server with Azure Active Directory authentication only setting enabled
Azure Active Directory admin is a Service Principal.
I am not able to restore database from backup when providing Service Principal name as Active Directory admin user name and its secret as Password.
Received error:
An error occurred while communicating with the SQL Server using AdPassword-login: Could not discover a user realm.
I am getting the same error both from Azure Portal and when using Azure CLI to restore the database.
At the same time I can use above Service Principal in Azure DevOps Pipelines to connect to database without any issues.
Would you be able to help with that?
Best regards,
Filip