|
1 | 1 | ---
|
2 |
| -title: Post event to custom Azure Event Grid topic |
3 |
| -description: This article describes how to post an event to a custom topic. It shows the format of the post and event data. |
4 |
| -ms.topic: concept-article |
5 |
| -ms.date: 06/18/2024 |
| 2 | +title: Publish Events to Azure Event Grid Custom Topics |
| 3 | +description: Discover how to post events to Azure Event Grid custom topics with step-by-step guidance on authentication, event schema, and sample requests. |
6 | 4 | #customer intent: As a developer, I want to know how to publish events to an Azure Event Grid custom topic
|
| 5 | +ms.topic: concept-article |
| 6 | +ms.date: 07/29/2025 |
| 7 | +ms.custom: |
| 8 | + - ai-gen-docs-bap |
| 9 | + - ai-gen-title |
| 10 | + - ai-seo-date:07/29/2025 |
| 11 | + - ai-gen-description |
7 | 12 | ---
|
8 | 13 |
|
9 | 14 | # Publish events to Azure Event Grid custom topics using access keys
|
| 15 | +This article provides guidance on how to publish events to Azure Event Grid custom topics using access keys. You learn about the required endpoint format, authentication headers, event schema, and how to send sample events. |
10 | 16 |
|
11 |
| -This article describes how to post an event to a custom topic using an access key. It shows the format of the post and event data. The [Service Level Agreement (SLA)](https://azure.microsoft.com/support/legal/sla/event-grid/v1_0/) only applies to posts that match the expected format. |
12 |
| - |
| 17 | +The [Service Level Agreement (SLA)](https://azure.microsoft.com/support/legal/sla/event-grid/v1_0/) only applies to posts that match the expected format. |
13 | 18 |
|
14 | 19 | > [!NOTE]
|
15 |
| -> Microsoft Entra authentication provides a superior authentication support than that's offered by access key or Shared Access Signature (SAS) token authentication. With Microsoft Entra authentication, the identity is validated against Microsoft Entra identity provider. As a developer, you won't have to handle keys in your code if you use Microsoft Entra authentication. you'll also benefit from all security features built into the Microsoft identity platform, such as Conditional Access, that can help you improve your application's security stance. For more information, see [Authenticate publishing clients using Microsoft Entra ID](authenticate-with-microsoft-entra-id.md). |
| 20 | +> Microsoft Entra authentication provides a superior authentication support than that's offered by access key or Shared Access Signature (SAS) token authentication. With Microsoft Entra authentication, the identity is validated against Microsoft Entra identity provider. As a developer, you won't have to handle keys in your code if you use Microsoft Entra authentication. You'll also benefit from all security features built into the Microsoft identity platform, such as Conditional Access, that can help you improve your application's security stance. For more information, see [Authenticate publishing clients using Microsoft Entra ID](authenticate-with-microsoft-entra-id.md). |
16 | 21 |
|
17 | 22 | ## Endpoint
|
18 |
| - |
19 |
| -When sending the HTTP POST to a custom topic, use the URI format: `https://<topic-endpoint>?api-version=2018-01-01`. For example, a valid URI is: `https://exampletopic.westus2-1.eventgrid.azure.net/api/events?api-version=2018-01-01`. To get the endpoint for a custom topic using Azure CLI, use: |
| 23 | +To publish events to a custom topic, send an HTTP POST request using the following URI format: `https://<topic-endpoint>?api-version=2018-01-01`. For example, a valid URI is: `https://exampletopic.westus2-1.eventgrid.azure.net/api/events?api-version=2018-01-01`. To get the endpoint for a custom topic, use Azure portal, Azure CLI, or Azure PowerShell. |
20 | 24 |
|
21 | 25 | # [Azure portal](#tab/azure-portal)
|
22 | 26 | You can find the topic's endpoint on the **Overview** tab of the **Event Grid Topic** page in the Azure portal.
|
23 | 27 |
|
24 |
| -:::image type="content" source="./media/post-to-custom-topic/topic-endpoint.png" alt-text="Screenshot that shows the Event Grid topic page on the Azure portal with the topic endpoint highlighted." lightbox="./media/post-to-custom-topic/topic-endpoint.png"::: |
| 28 | +:::image type="content" source="./media/post-to-custom-topic/topic-endpoint.png" alt-text="Screenshot of the Event Grid topic page in the Azure portal with the topic endpoint highlighted." lightbox="./media/post-to-custom-topic/topic-endpoint.png"::: |
25 | 29 |
|
26 | 30 | # [Azure CLI](#tab/azure-cli)
|
27 | 31 |
|
@@ -60,7 +64,7 @@ az eventgrid topic key list --name <topic-name> -g <topic-resource-group> --quer
|
60 | 64 |
|
61 | 65 | ---
|
62 | 66 |
|
63 |
| -## Event data |
| 67 | +## Event data schema for custom topics |
64 | 68 |
|
65 | 69 | For custom topics, the top-level data contains the same fields as standard resource-defined events. One of those properties is a `data` property that contains properties unique to the custom topic. As an event publisher, you determine properties for that data object. Here's the schema:
|
66 | 70 |
|
@@ -97,7 +101,7 @@ For example, a valid event data schema is:
|
97 | 101 | }]
|
98 | 102 | ```
|
99 | 103 |
|
100 |
| -## Send the sample event |
| 104 | +## Send a sample event |
101 | 105 | This section shows how to send a sample event to the custom topic.
|
102 | 106 |
|
103 | 107 | # [Azure portal](#tab/azure-portal)
|
@@ -185,6 +189,6 @@ For errors, the message body has the following format:
|
185 | 189 |
|
186 | 190 | ## Related content
|
187 | 191 |
|
188 |
| -* For information about monitoring event deliveries, see [Monitor Event Grid message delivery](monitor-event-delivery.md). |
189 |
| -* For more information about the authentication key, see [Event Grid security and authentication](security-authentication.md). |
190 |
| -* For more information about creating an Azure Event Grid subscription, see [Event Grid subscription schema](subscription-creation-schema.md). |
| 192 | +* [Monitor Event Grid message delivery](monitor-event-delivery.md): Learn how to track and troubleshoot event deliveries. |
| 193 | +* [Event Grid security and authentication](security-authentication.md): Understand how to secure your events with authentication keys. |
| 194 | +* [Event Grid subscription schema](subscription-creation-schema.md): Step-by-step guidance on creating an Event Grid subscription. |
0 commit comments