Hey @Lorrin Ferdinand could you share the solution? We are facing the same problem.
Invoke-SqlCmd using token to connect to Azure Synapse dedicated or serverless sql pool
Hello,
Requirement: Add a contained database user for an Azure AD group to the database hosted by a dedicated or serverless sql pool on Azure Synapse Analytics workspace using powershell in an azure pipeline (automated)
Problem Statement: When attempting to do this, we first obtain a token, but invariably, regardless of the endpoint from which we obtain the token, we are getting "Login Failed for Token-Identified principal". We are using the service principal backing the Service Connection. This SPN is the Azure AD SQL Administrator on the Synapse Workspace.
Details:
Endpoints tested:
- https://management.azure.com
- https://dev.azuresynapse.net
- https://sql.azuresynapse.net
- https://database.windows.net
Is this connection method (i.e. using token) supported for Azure Synapse?
Is there an unpublished endpoint that I should be using?
Any assistance with this is greatly appreciated!