0

For some use case, I rejected the approved private end point for a storage account. But I can’t move the state from Rejected to approved.

I tried using AzCLI and powershell to move from rejected state to approve state for the private end point but it’s not working.

Imran
  • 3,875
  • 2
  • 3
  • 12

1 Answers1

0

I have created private endpoint with storage account and rejected like below:

enter image description here

Note that: Azure Storage Accounts do not have a built-in feature to approve a rejected private endpoint within the Azure portal or management interfaces. During the creation of a private endpoint, you can approve, deny, after being refused, you cannot approve.

$approve = @{
    Name = 'myPrivateEndpointConnection'
    ServiceName = 'myPrivateLinkService'
    ResourceGroupName = 'myResourceGroup'
}
Approve-AzPrivateEndpointConnection @approve
$deny = @{
    Name = 'myPrivateEndpointConnection'
    ServiceName = 'myPrivateLinkService'
    ResourceGroupName = 'myResourceGroup'
}
Deny-AzPrivateEndpointConnection  @deny

When I check same in the portal, I can only remove the rejected private endpoint that was built in.

enter image description here

To remove rejection private endpoint via PowerShell you can make u of below command:

$remove = @{
    Name = 'myPrivateEndpointConnection'
    ServiceName = 'myPrivateLinkService'
    ResourceGroupName = 'myResourceGroup'
}
Remove-AzPrivateEndpointConnection @remove

Reference:

Manage Azure Private Endpoints - Azure Private Link | Microsoft Learn

Imran
  • 3,875
  • 2
  • 3
  • 12