Unable to delete Azure Image Template Builder resource

NGANDU-BISEBA Gabriel 55 Reputation points
2023-03-15T10:45:01.97+00:00

Hello,

I currently have an Azure Image Builder resource that I deployed and ended up in failed provisioning state due to not having enough permissions.

Normally, deleting it and redeploying would work, but after many attempts through the portal and powershell, it appears that I am unable to delete this resource.

The error code of the failed deletion attempt is the error that appears on the resource itself (ie: no permissions on x resource group, must disable private endpoint network policy, ....)

Is there any way to forcefully delete this resource without having to do a complete deployment / delete the rg?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
42,921 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. NGANDU-BISEBA Gabriel 55 Reputation points
    2023-03-17T08:53:46.61+00:00

    I finally found the solution.

    If you are in the same situation, try to solve the errors one by one (example: If your identity miss a permission, give it to the identity and wait until the error changes). Then try to delete the resource.

    After solving a certain amount of errors, the resource will be able to be deleted. In my case, it allowed to delete the resource when the "Private service endpoint policies must be disabled" error appeared.

    0 comments No comments

  2. paul udomi 25 Reputation points
    2025-03-08T23:34:42.1+00:00

    To resolve the issue, kindly carry out the following steps:

    1. Ensure the Managed identity (User Assigned managed identity/System Assigned Identity) has required RBAC permission (Contributor role or more) at the Resource group level or resource level.
    2. proceed to delete the Azure image template using the Azure portal.
    3. Wait for a few minutes, and click on refresh button to validate the deletion of the image template.
    0 comments No comments

Your answer

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