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:
- 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
- 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
- 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.
- 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.