Activating Custom JWT authentication causes Internal Server Error

Lichtblau, Martin 0 Reputation points
2025-03-25T07:45:03.7+00:00

Activating Custom JWT Authentication results in the following error:
"Update of your namespace failed with the following error: "The operation failed due to an internal server error. The initial state of the impacted resources (if any) are restored. Please try again in few minutes. If error still persists, report c230d3a4-27fe-4160-9bae-fe57654874c4:3/25/2025 7:13:12 AM (UTC) to our forums for assistance or raise a support ticket ."

The first time it worked. After that never again. Tried multiple times in a row.
I don't know if it's a problem with the managed idenity or the certificate stored in the KeyVault.

Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
439 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sander van de Velde | MVP 36,146 Reputation points MVP
    2025-03-25T20:20:45.79+00:00

    Hello @Lichtblau, Martin ,

    welcome to this moderated Azure community forum.

    It seems there is something going wrong inside the Eventgrid itself although it could be a UI Portal glitch.

    Please try it another time or use the Azure CLI or PowerBI to make the changes.

    If this does not work, create an Azure support ticket.

    Please share the region and the actions you perform or the manual you follow.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.


  2. Lichtblau, Martin 0 Reputation points
    2025-04-02T15:37:11.09+00:00

    Updating the resource property topicSpacesConfiguration with an encodedCertificate as customJwtAuthentication succeeded. But it seems that the server accepts any value for the fields encodedCertificate and kid. The EventGrid Configuration page shows the issuer, but seemingly doesn't get it that I use an encodedCertificate, since it shows an error that I haven't selected an issuer certificate.
    User's image

    Sadly, Custom-JWT client authentification doesn't work with an encodedCertifcate, responding Connecting with MQTT server failed (NotAuthorized).

    FYI.: A user on github also received the internal server when re-enabling custom JWT authentication using an Azure KeyVault (see https://github.com/Azure/terraform-provider-azapi/issues/790).

    **Please fix the error so that it's possible to select a certifcate KeyVault just like mentioned in the documentation.

    UPDATE:** MQTT client authentication works now! Had to adapt the encoding and formatting of the encodedCertificate and private key used for signing the client JWT. But still ...

    0 comments No comments

Your answer

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