question

LorrinFerdinand-1094 avatar image
0 Votes"
LorrinFerdinand-1094 asked OliveiraMagnoNonEmp-4120 published

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:

  1. https://management.azure.com

  2. https://dev.azuresynapse.net

  3. https://sql.azuresynapse.net

  4. 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!


windows-server-powershellazure-synapse-analytics
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @LorrinFerdinand-1094,

Welcome to the MS Q&A platform.

As per the discussion on the email, try to checkout the attachment and do let us know if any help needed.

And also, you may checkout the SO thread addressing similar issue.


0 Votes 0 ·

Hi @LorrinFerdinand-1094,

Following up to see if the above suggestion was helpful. And, if you have any further query do let us know.

0 Votes 0 ·

Hello,

I haven't tried yet, but I did review the email. It appears there is promise. However, if you guys can find out what the correct endpoint is then I think this is where my problem lies at the moment.

Thanks,
Lorrin

0 Votes 0 ·
Show more comments

1 Answer

OliveiraMagnoNonEmp-4120 avatar image
0 Votes"
OliveiraMagnoNonEmp-4120 answered OliveiraMagnoNonEmp-4120 published

Hey @LorrinFerdinand-1094 could you share the solution? We are facing the same problem.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.