I want to deploy my SQL scripts to synapse from powershell using Invoke-Sqlcmd utility
We have disable username/password authentication and the only way to do it is by using Managed Identity/AD Service Principal.
How can I leverage Powershell to perform this deployment using AD Service principal authentication ?
you can generate Access Token :
https://learn.microsoft.com/en-us/powershell/module/sqlserver/invoke-sqlcmd?view=sqlserver-ps
My blog can help : https://datasharkx.wordpress.com/2021/03/12/automated-deployment-of-azure-sql-database-azure-sql-data-warehouse-through-azure-devops-via-service-principal-part-2/