Hi
Matt Huang •,
Welcome to Microsoft Q&A forum and thanks for using Azure Services.
As I understand, you want to find the Shortest Path between two vertices.
Could you please take a look at the similar questions over stackoverflow which might help:
Let us know if this helps or else share more details so that we can assist you.
Thanks for your support.