Azure Event Grid: Not able to publish message to Namespace topic with aeg-sas-key header

Jeevanjyot Kaur 0 Reputation points
2025-11-05T21:14:56.0466667+00:00

I am publishing a message to an Azure Event Grid Namespace Topic using the REST API with aeg-sas-key authentication. However, I am encountering the following error during the publish request.

{
    "error": {
        "code": "Unauthenticated",
        "message": "SAS Key or SAS Signature must be provided",
        "timestamp_utc": "2025-11-05T21:10:18.935050584+00:00",
        "tracking_id": "146AC7EA<***removed PII***>"
    }
}
Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Praveen Kumar Gudipudi 1,495 Reputation points Microsoft External Staff Moderator
    2025-11-06T18:45:10.8033333+00:00

    Hello Jeevanjyot Kaur,
    Include the SAS Key in the Header

      • The header should look like:
             aeg-sas-key: <your-SAS-key>
        
      • This key is generated from the Event Grid Namespace Topic in the Azure portal or via CLI.
    1. Verify the Header Name
      • It must be exactly aeg-sas-key (case-sensitive).
      • If you are using a SAS token instead of a key, the header should be:
             aeg-sas-token: <your-SAS-token>
        

    Please accept as answer and do a Thumbs-up to upvote this response if you are satisfied with the community help. Your upvote will be beneficial for the community users facing similar issues.

     User's image

    0 comments No comments

Your answer

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