Can't use Custom Input Schema in Event Grid Trigger in Function App

billpark 1 Reputation point
2021-06-17T19:56:45.533+00:00

In Create Even Subscription,
Cannot set Event Schema to Custom Input Schema
Returns
Deploying Event Subsctiption: test3
Deployment has failed with the following error:
The specified EvenDelverySchema value "CustomInputSchema" cannot be used in combination with the topic's input schema of EventGridSchema.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,679 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,016 Reputation points
    2021-06-18T05:34:33.493+00:00

    Hi @billpark

    Welcome to Microsoft Q&A! Thanks for posting the question.

    If you are creating the event grid subscription on the built in topic then this is not supported. As all Azure Event Grid (built-in) topic's input schemas are using a default schema i.e. EventGridSchema. In this case the input schema can be mapped to the output schema (delivery schema) only to EventGridSchema or CloudEventSchema.
    Therefore you are receiving the below error message :
    The specified EvenDelverySchema value "CustomInputSchema" cannot be used in combination with the topic's input schema of EventGridSchema.

    You can try leveraging the Custom delivery properties with the EvenDelverySchema schema and see if it helps you with your scenario. If not then you need to have the middleware which can handle it for you like APIM or your custom code that is deployed to handle this in middleware.

    Eventgrid subscription (EventGridSchema) (webook endpoint as APIM URL) --> APIM (transformation policy to change the schema as per your requirement) --> Azure function

    Note: If you are using the above approach then you need to pass the Authentication to the APIM leveraging Custom delivery properties and you should handle the Authentication event delivery to webhook endpoint.

    In case, if you are using the custom topic and creating the event grid subscription with the schema as input schema then this error is observed if your custom topic was created with the EventGridSchema or CloudEventsSchema. In this scenario, you need to recreate your custom topic with "Custom Input Schema" and then create the subscription.

    106867-image.png

    Input Mapping reference : https://learn.microsoft.com/en-us/azure/event-grid/input-mappings

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    0 comments No comments