Unable to create Eventgrid System Topic For Azure Maps geofencing event

Olivier G 16 Reputation points
2021-12-14T12:48:48.437+00:00

Dear,

I tried to follow this guide but I can not create the Azure map event, the error is:

"properties": {    
        "statusCode": "BadRequest",  
        "serviceRequestId": "55c90d78-deeb-4326-bdc8-c24d9acd7b8b",  
        "statusMessage": "{\"error\":{\"code\":\"InvalidRequest\",\"message\":\"System topic's location must match with location of the source resource /subscriptions/73a8853c-4612-48c4-a476-f04e5c029cbd/resourceGroups/rg-quuppa-demo-wus2-dev/providers/Microsoft.Maps/accounts/maps-quuppa-demo.\"}}",  
        "eventCategory": "Administrative",  
        "entity": "/subscriptions/73a8853c-4612-48c4-a476-f04e5c029cbd/resourceGroups/rg-quuppa-demo-wus2-dev/providers/Microsoft.EventGrid/systemTopics/topic-quuppa-demo-geofencing",  
        "message": "Microsoft.EventGrid/systemTopics/write",  
        "hierarchy": "b105310d-dc1a-4d6e-bf0d-b11c10c47b0f/73a8853c-4612-48c4-a476-f04e5c029cbd"  
    },  

But as far as I understand this page we can not select location of system topics, they are assigned by the system. So how can I create the system topic to have my geofencing events published?

Thanks

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
664 questions
Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
354 questions
{count} votes

1 answer

Sort by: Most helpful
  1. António Sérgio Azevedo 7,666 Reputation points Microsoft Employee
    2021-12-28T21:40:28.237+00:00

    Hello @Olivier G ,

    I was able to successfully create Eventgrid System Topic For Azure Maps geofencing event, though I did some different steps than ones documented (I will do a Pull Request to enhance the doc after you confirm it works for you :) ).

    1) When we create the Event Subscription on Azure Maps using Web Hook Endpoint Type you will notice that it will be waiting for the webhook to be validated:

    160947-image.png

    This related thread in StackOverflow helped me understand it: Not able to add webhook subscription to the Azure Event Grid - Stack Overflow

    In order to validate the Webhook, I went to Logic App Workflow and checked the Run History:

    160948-image.png

    Opened the workflow and copied the validationUrl in the output and then called it on PostMan with POST HTTP method:

    160996-image.png

    160928-image.png

    Then the Event Subscription is successfully configured:

    161003-image.png

    2) As per the Event Grid System Topic location, it should be showing as Global

    160976-image.png

    I made sure that Azure Maps didn't have any Event Grid System Topic associated with it, before I created my first Event Subscription. When created in the Azure Maps Resource, it will create it as Global... Make sure System Topic Name is empy:

    160929-image.png

    Let me know if you have further questions?

    Remember:

    • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification.