Unable to delete private endpoint created for Recovery Service Vault which is in Failed state.

Grzegorz Koperczak 0 Reputation points
2025-11-30T14:33:36.4166667+00:00

How problematic state appear:
Attempt to create Private Endpoint for Recovery Service Vault has not finished with success (failed state)

It looks private DNS zone creation was not performed correctly (privatelink.plc.backup.windowsazure.com and privatelink.queue.core.windows.net)
I was able to create those zones manually.

Have tried to create another private endpoint on this Recovery Service Vault, but same failed state result.

Possible workaround:

I was able to create another Recovery Service Vault with private endpoint with success, but i need to be able to keep my backup items collected by old Recovery Service Vault and don't want to keep two Recovery Service Vaults.

Provided guidance https://learn.microsoft.com/en-us/answers/questions/124956/cannot-delete-private-endpoint-connection
does not fix the issue, getting an error:

Set-AzPrivateEndpoint: Long running operation failed with status 'Failed'. Additional Info:'Call to Microsoft.RecoveryServices/vaults failed. Error message: Another private endpoint operation is in progress on this vault. Please try the operation again after sometime.'

StatusCode: 200

ReasonPhrase:

Status: Failed

ErrorCode: UserErrorAnotherPEOperationInProgress

ErrorMessage: Call to Microsoft.RecoveryServices/vaults failed. Error message: Another private endpoint operation is in progress on this vault. Please try the operation again after sometime.
Same error when trying: Remove-AzPrivateEndpoint

When trying to Diagnose and Solve (troubleshoot)
Resources are out-of-sync with Azure Resource Manager

We've discovered that resources related to this issue are out-of-sync with Azure Resource Manager. We have now synced them to resolve the issue. No additional actions are required on your part.

Check the status of the resource and/or operation in 20 minutes to verify that your issue has been resolved.
But this does not help in any way.

Azure Private Link
Azure Private Link
An Azure service that provides private connectivity from a virtual network to Azure platform as a service, customer-owned, or Microsoft partner services.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Andriy Bilous 12,076 Reputation points MVP Volunteer Moderator
    2025-11-30T21:38:04.94+00:00

    Hello Grzegorz Koperczak

    The “AnotherPEOperationInProgress” is coming from the vault RP

    UserErrorAnotherPEOperationInProgress “Call to Microsoft.RecoveryServices/vaults failed. Error message: Another private endpoint operation is in progress on this vault.”

    is returned by the Microsoft.RecoveryServices provider (the vault itself), not by the Microsoft.Network private endpoint. That’s why both:

    • Set-AzPrivateEndpoint
    • Remove-AzPrivateEndpoint

    fail with the same message – the networking RP calls into RecoveryServices to update/remove the connection, and the RecoveryServices RP says “no, I already have a PE operation in flight,” and the whole long-running operation is marked Failed.

    Here is the PowerShell script checks the state of the PrivateEndpoint before deletion; if the PrivateEndpoint is connected, it will not be deleted $privateEndpoint = Get-AzPrivateEndpoint -Name "venkat-endpoint" -ResourceGroupName "RG_Name"

             if ($privateEndpoint -eq $null) {         Write-Host "Private endpoint not found."     } else {         $endpointstate = $privateEndpoint.PrivateLinkServiceConnectionsText | ConvertFrom-Json | Select-Object -ExpandProperty PrivateLinkServiceConnectionState | Select-Object -ExpandProperty Status              if ($endpointstate -eq 'Disconnected') {                          Write-Host "Private endpoint name : venkat-endpoint is in : $endpointstate state"                         Remove-AzPrivateEndpoint -Name "venkat-endpoint" -ResourceGroupName "v-vallepuv-Mindtree" -Force                  Write-Host "Private endpoint deleted successfully."              } else {             Write-Host "Private endpoint is not in a disconnected state. Current state: Connected"         }}
    

    https://learn.microsoft.com/en-us/answers/questions/5583200/cannot-delete-stuck-private-endpoint-in-azure-vnet


  2. Ravi Varma Mudduluru 3,625 Reputation points Microsoft External Staff Moderator
    2025-12-01T01:31:58.0833333+00:00

    Hello @Grzegorz Koperczak,

    Thanks for reaching out to Microsoft Q&A.

    I understand that you are unable to delete the private endpoint which is created for recovery service vault.

    I see that the endpoint connection status is currently set to approved. If you want to delete the private endpoint, please change the connection status from approved to rejected, and then try deleting the private endpoint. This should allow you to remove it.

    If the connection status is approved state, it will not allow you to delete the private endpoint.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.