Skip to content

Commit 1b1cac1

Browse files
committed
Webhook auth for MQTT clients
1 parent 02af9ab commit 1b1cac1

5 files changed

Lines changed: 359 additions & 2 deletions

File tree

articles/event-grid/authenticate-with-namespaces-using-webhook-authentication.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: This article shows you how to authenticate with Azure Event Grid na
44
ms.topic: how-to
55
ms.custom:
66
- build-2025
7-
ms.date: 07/30/2025
7+
ms.date: 03/23/2026
88
author: Connected-Seth
99
ms.author: seshanmugam
1010
---
@@ -47,6 +47,9 @@ az eventgrid namespace update --resource-group <resource group name> --name <nam
4747

4848
For information on how to configure system and user-assigned identities by using the Azure portal, see [Enable managed identity for an Event Grid namespace](event-grid-namespace-managed-identity.md).
4949

50+
51+
52+
5053
## Grant the managed identity appropriate access to a function or webhook
5154

5255
Grant the managed identity of your Event Grid namespace the appropriate access to the target Azure function or webhook.
@@ -131,7 +134,11 @@ Replace `<NAMESPACE_NAME>` and `<RESOURCE_GROUP_NAME>` with your actual values.
131134

132135
### Request headers
133136

137+
Azure Event Grid sends the following headers in the request to the webhook:
138+
139+
```
134140
**Authorization**: Bearer token
141+
```
135142

136143
The token is a Microsoft Entra token for the managed identity that was configured to call the webhook.
137144

@@ -193,6 +200,20 @@ Content-Type: application/json
193200
}
194201
```
195202

203+
**Error codes:**
204+
205+
206+
207+
| Authentication Outcome | Function response | Event Grid MQTT reason code |
208+
|------------------------|-----------------|------------------|
209+
| Explicit authorization denial | `"decision": "deny"` | Not authorized |
210+
| Invalid / expired token | `"decision": "deny"` | Not authorized |
211+
| Function timeout | N/A | Server unavailable |
212+
| Function exception / crash | N/A | Server unavailable |
213+
| Transient platform failure | N/A | Server unavailable |
214+
| Internal broker processing error | N/A | Server unavailable |
215+
216+
196217
### Response field descriptions
197218

198219
| Field | Description |
Lines changed: 280 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)