Synapse failed to unsubscribe to events for event trigger which does not exist anymore

Victor 36 Reputation points
2022-09-02T10:19:32.733+00:00

We deleted a storage for which an EventTrigger in Synapse existed.

Later on we realized this but when we tried to delete the trigger in Synapse, we cannot publish our Synapse workspace anymore as the workspace complains that he cannot unsubscribe from the EventTrigger (which does not exist anymore).

The client 'X-X-X-X-XXXXX' with object id 'XX-X-XXX-XXX-XXXXXXX' does not have authorization to perform action 'Microsoft.EventGrid/eventSubscriptions/delete' over scope '/subscriptions/X-X-X-X-X/resourceGroups/<RESOURCE_GROUP_NAME>/providers/Microsoft.Storage/storageAccounts/datastorrawdapdt/providers/Microsoft.EventGrid/eventSubscriptions/X-X-X-X-X' or the scope is invalid. If access was recently granted, please refresh your credentials.

How can I fix this? Synapse tries to delete something that does not exist anymore and fails to do so.

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.
4,696 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 32,161 Reputation points Microsoft Employee
    2022-09-05T16:07:22.283+00:00

    Hi @Victor ,

    Thankyou for using Microsoft Q&A platform and thanks for posting your question.

    As I understand your issue, you are trying to delete the event based trigger which was pointing to a storage location that's no longer in place and is leading to the above stated error. Please let me know if my understanding about your query is incorrect.

    I would recommend you to check and make sure that the following permissions are granted :

    1. The synapse workspace managed identity and your active directory Id has Contributor access to the event grid subscription.
    2. Event grid resource provider has been registered in the subscription level.

    Please let me know if the above solution helps. Looking forward to your response. Thanks.