Hello, Welcome to Microsoft Q&A
The 404
isn’t because you misconfigured your request , it’s because MQTT-over-HTTP Publish is not enabled on your namespace yet, even though the docs describe it. The right token resource is https://eventgrid.azure.net
, but until your namespace is in a region/feature ring that supports the /mqtt/messages
endpoint, you’ll continue to see 404s.
- Verify Feature Availability
- Run:
and check for mqtt/preview flags in the output.az eventgrid namespace show --name <namespace> --resource-group <rg>
- If not present, your namespace doesn’t support HTTP publish yet.
- Run:
- Token Acquisition Fix Use:
az account get-access-token --resource=https://eventgrid.azure.net --query accessToken -o tsv
This gives the correct bearer token.
Public preview is rolling out region by region. If you’re outside the enabled set, you’ll always get a 404. If you need this feature for testing, log a support ticket with Microsoft or upvote/comment on the GitHub issues linked from the Event Grid preview docs.
😊 If my answer helped you resolve your issue, please consider marking it as the correct answer. This helps others in the community find solutions more easily. Thanks!