how to query trigger runs on Azure Synapse Analytics using rest api?

Vishnupriya N 0 Reputation points
2024-06-13T05:53:14.8366667+00:00

https://learn.microsoft.com/en-us/rest/api/datafactory/trigger-runs/query-by-factory?view=rest-datafactory-2018-06-01&tabs=HTTP
I tried a similar process in Azure synapse analytics like above one. But I got an error like below. it shows object id '2419a9b5-81e6-4b6f-bc84-d2ce2412345' does not have authorization to perform action. I used SYSTEM ASSIGNED MANAGED IDENTITY only.

Below I have attached web activity query and error message.
User's image

Error Message image:

I tried without specifying the workspace name like below image . That also gave error

User's image

Error Message:
User's image

There is already a pipeline for pausing and restarting the SQL pool in that synapse. So I assumed that they had a contributor role. Could you please correct me if I'm wrong?

Please.. assist me to resolve this issue.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
{count} votes

1 answer

Sort by: Most helpful
  1. phemanth 15,755 Reputation points Microsoft External Staff Moderator
    2024-06-14T05:14:14.04+00:00

    @Vishnupriya N

    Thanks for using MS Q&A platform and posting your query.

    I understand you’re having trouble querying trigger runs on Azure Synapse Analytics using the REST API and you’re encountering an authorization error. Here are a few steps that might help resolve the issue:

    1. Managed Identity: Ensure that the Managed Identity is correctly set up. Azure Synapse Analytics requires a system-assigned managed identity to be created along with the Synapse workspace. If you’re using a system-assigned managed identity, make sure it’s correctly associated with your Synapse workspace
    2. Permissions: The Managed Identity needs to have the necessary permissions to perform the action. If you’re trying to access resources like Azure Key Vault or storage accounts, the service uses the managed identity to obtain tokens. Make sure the Managed Identity has the necessary roles assigned. For example, if you’re accessing an ADLS Gen2 storage account, the Azure Synapse managed identity needs the Storage Blob Data Contributor role on this storage account
    3. Re-register Managed Identity: If the “Allow Pipelines” option is already checked in the Managed identities blade of your Synapse workspace in the Azure portal, you must uncheck this setting and save. Then check the “Allow Pipelines” option again and save. This re-registers the workspace’s managed identity.
    4. SQL Pool: If there’s already a pipeline for pausing and restarting the SQL pool in Synapse, ensure that the Managed Identity has the necessary permissions to perform these actions

    Hope this helps. Do let us know if you any further queries.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.