Azure Maps gets its road data from TomTom primarily.
There is no mechanism to upload custom paths to be included in the route calculations done by Azure Maps. Although this was an idea that was discussed some years ago but there weren't many customers we came across who needed this.
That said I have done routing in apps before using a combination of private path data and Azure Maps. To do this I did the following:
- Analyze private route network and determine which points connect to the public network. Lets call these transfer nodes. Lots of different ways to do this, sometime this is something that is already known.
- To calculate a route, check to see if the start or end are within a private area. If they are, then use the start/end to get a rough idea of the direction you want to head and find the transfer nodes that should be used to move between public and private roads.
- Calculate the route in chunks. Calculate route from origin to the first transfer node (determine if you are starting within the private area or not). Then use Azure Maps route service calculate route section on public roads to destination or next transfer point depending on if you enter into a private area again or not.
You would have to calculate the route on private roads outside of Azure Maps itself. If you route networks are small, this can be done fairly easily in JavaScript even. Here is an example: https://samples.azuremaps.com/?sample=route-along-geojson-network
If your route network is large, consider using Postgres with the pgRouting extension.