79728058

Date: 2025-08-07 04:21:10
Score: 0.5
Natty:
Report link

It seems as if there is not currently support for what I am trying to do using either azure cli or Azure Powershell, but the necessary functionality is exposed via REST api. This will approve a private endpoint on a SQL MI. Props to Cory for the solution.

# Set variables
$subscriptionId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
$resourceGroupName = "myresourcegroupname"
$managedInstanceName = "mysqlmi"
$privateEndpointConnectionName = "mysqlmy.endpointId"
# Build URL properly for PowerShell
$resourcePath = "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.Sql/managedInstances/$managedInstanceName/privateEndpointConnections/$privateEndpointConnectionName"
# Execute the approval with proper JSON escaping for PowerShell
az rest --method PUT --url $resourcePath --url-parameters 'api-version=2024-05-01-preview' --body '{\"properties\":{\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"Approved by pipeline\"}}}'
Reasons:
  • Blacklisted phrase (1): I am trying to
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: Greg the Incredulous