Azure / Azure/azure-rest-api-specs

[BUG] Event Grid Channels - Default activation message exceeds character limit

Open
#37,280 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

Description

### API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2025-02-15/EventGrid.json

### API Spec version

2025-02-15

### Describe the bug

When a `messageForActivation` field is not specified in the Create/Update endpoint for Channel, the API will set a default automatically based on the Partner Topic name and source. For instance:
```
"The partner topic examplePartnerTopic1 was created on behalf of the publisher for source ContosoCorp.Accounts.User1 on 9/10/2025 1:53:41 AM. If you do not recognize or authorize this creation operation, please delete this partner topic and/or reach out to the customer service for the publisher. "
```
The character limit for `messageForActivation` is 256 characters and thus if this message is passed back into the request body an error will be thrown.
```
{
"error": {
"code": "InvalidRequest",
"message": "Invalid Channel request: The MessageForActivation is invalid as its length is more than 256 characters."
}
}
```

Our standard flow involves taking the response body from a create and passing it back to the request body for updates to ensure that all fields are kept/updated as per user expectation.
Even without the topic name and source, the string is already 249 characters long so we can't simply reduce the character limits to avoid the problem. As such, with this limitation we need to deviate from our standard logic and explicitly identify if there are any changes and then remove the field for this specific service if there is no updates.

From a user of this API's perspective, the character limit seems unnecessary as the default message length exceeds it and can be used without any issues.

### Expected behavior

I should be able to pass back in the same activation message that was set by default by the API back into the update payload without getting an error message.

### Actual behavior

```
{
"error": {
"code": "InvalidRequest",
"message": "Invalid Channel request: The MessageForActivation is invalid as its length is more than 256 characters."
}
}
```

### Reproduction Steps

1. Create a basic Event Grid Channel as per example in REST API documentation without `messageForActivation` field
```
{
"properties": {
"channelType": "PartnerTopic",
"partnerTopicInfo": {
"azureSubscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4",
"resourceGroupName": "examplerg2",
"name": "examplePartnerTopic1",
"source": "ContosoCorp.Accounts.User1"
},
}
}
```
2. Pass the response body back into the request body field as per updating.
```
{
"properties": {
"channelType": "PartnerTopic",
"partnerTopicInfo": {
"azureSubscriptionId": "5b4b650e-28b9-4790-b3ab-ddbd88d727c4",
"resourceGroupName": "examplerg2",
"name": "examplePartnerTopic1",
"source": "ContosoCorp.Accounts.User1"
},
"messageForActivation": "The partner topic examplePartnerTopic1 was created on behalf of the publisher for source ContosoCorp.Accounts.User1 on 9/10/2025 1:53:41 AM. If you do not recognize or authorize this creation operation, please delete this partner topic and/or reach out to the customer service for the publisher. ",
"provisioningState": "Succeeded",
"readinessState": "NeverActivated",
"expirationTimeIfNotActivatedUtc": "2025-09-17T01:53:41.3074326Z"
},

### Environment

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the linked Event Grid API specification, Microsoft.EventGrid stable 2025-02-15 EventGrid.json, and inspect the Channel Create/Update definition for messageForActivation and its 256-character constraint. Reproduce the documented create-then-update flow, then confirm that the default activation message can be returned in an update payload without the reported validation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.