Kyle Brandt
Kyle Brandt

Reputation: 28407

How to programmatically generate/get a link to Azure's Portal for a resource?

Give a list of resources from Azure's Rest API via Resources - List. Is there a way I can reliability generate or fetch a link to the Azure Portal's (portal.azure.com) overview of that resource?

Upvotes: 2

Views: 2564

Answers (1)

Gaurav Mantri
Gaurav Mantri

Reputation: 136196

To deeplink a resource in the portal, here's the logic we're using to create the link:

[portal-url]/#@[tenant-id]/resource/[resource-id]

Where

[portal-url]: https://portal.azure.com

[tenant-id]: something.onmicrosoft.com or tenant guid

[resource-id]: Id of the resource returned through resource list API call

Upvotes: 13

Related Questions