question

billpark-4602 avatar image
0 Votes"
billpark-4602 asked MayankBargali-MSFT edited

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

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered MayankBargali-MSFT edited

Hi @billpark-4602

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://docs.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.


image.png (14.4 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.