Skip to content

Failed to Subscribe / Failed to Activate Storage Event Trigger After Publishing in Azure Synapse Analytics

I ran into an issue today while trying to publish a storage event trigger in Azure Synapse Analytics. After publishing, I got error messages that said “failed to subscribe” and “failed to activate”. The storage event trigger had been published, but it wouldn’t start. Help! 😱

Screenshot of Azure Synapse Analytics notifications showing “failed to subscribe” and “failed to activate” errors.

(Skip to how I fixed the failed to subscribe / failed to activate errors 👇🏻)

The Error Messages

The error messages hinted at access control or permission issues:

Error: Failed to subscribe to events for event trigger [Trigger Name] (Trigger).

Screenshot of Azure Synapse Analytics notifications showing the details of the “failed to subscribe” error.

“The received access token is not valid: at least one of the claims ‘puid’ or ‘altsecid’ or ‘oid’ should be present. If you are accessing as application please make sure service principal is properly created in the tenant.”

Error: Failed to activate [Trigger Name] (Trigger).

Screenshot of Azure Synapse Analytics notifications showing the details of the “failed to activate” error.

“The client ‘[GUID]’ with object id ‘[GUID]’ does not have authorization to perform action ‘Microsoft.EventGrid/eventSubscriptions/write’ over scope ‘/subscriptions/[Subscription ID]/resourceGroups/[Resource Group Name]/providers/Microsoft.Storage/storageAccounts/[Storage Account Name]/providers/Microsoft.EventGrid/eventSubscriptions/[GUID]’ or the scope is invalid. If access was recently granted, please refresh your credentials.”

How I didn’t fix the errors

First, I re-read all the important purple notes in the documentation.

Then, I double-checked and triple-checked all the role-based access control settings.

No luck.

Finally, I managed to dig up a Microsoft Q&A thread from August 2020. The last answer from FMSFT-4369 contained the solution!

Screenshot of the answer in the Microsoft Q&A thread.

How I fixed the failed to subscribe / failed to activate errors

Since we were only using Azure Synapse Analytics, we hadn’t registered the Data Factory resource provider. Once we registered Microsoft.DataFactory, everything worked perfectly! 🥳

Screenshot showing the Microsoft.DataFactory resource provider registered.

Summary

TL;DR: Even if you are not using Azure Data Factory, you need to register the Microsoft.DataFactory resource provider for storage event triggers to work properly in Azure Synapse Analytics.

(Don’t ask me why! But at least it works now 😄)

Share or Comment?

About the Author

Professional headshot of Cathrine Wilhelmsen.Cathrine Wilhelmsen is a Microsoft Data Platform MVP, international speaker, author, blogger, organizer, and chronic volunteer. She loves data and coding, as well as teaching and sharing knowledge - oh, and sci-fi, gaming, coffee and chocolate 🤓