Azure - Private endpoint information from Graph explorer

374 views Asked by At

I would like to make use of Azure Graph explorer to obtain private endpoint information of certain resource type, e.g. event hubs, KV, mysql ,etc. Basically what I would like is a table format like this

"Name of resource, Private endpoint connecting to this resource, IP of that private endpoint, subnet of that private endpoint"

Is it possible to grab these from Azure Graph explorer?

1

There are 1 answers

0
RithwikBojja On

Is it possible to grab these from Azure Graph explorer?

Yes, this is possible but not all properties which you asked are possible. Below are the properties which are possible:

When you open any resource the properties which are visible in UI can be achieved using Azure resource graph explorer:

enter image description here

To get all resources for which private endpoint is enabled, use KQL like below:

resources
| where array_length(properties.privateEndpointConnections) > 0

enter image description here

To get the name of resource and private endpoint connection use below KQL query:

resources
| where array_length(properties.privateEndpointConnections) > 0
| mv-expand properties.privateEndpointConnections
| extend id2 = properties_privateEndpointConnections.id
| extend name2= split(id2,'/')
| extend Conname= name2[-1]
|project  name, Conname

enter image description here

But if you want private endpoint name, privateip, and subnet you can use below query:

add these 2 lines at the end of the query you got from here and click on open query like below:

enter image description here

Then when it opens you will get a default query then add below lines at end of the query:

| extend nameofprivateendpoint = name
| project nameofprivateendpoint,privateIP,subnetName

Output:

enter image description here