Unable to remove a role that is currently not in use

IT 0 Reputation points
2026-08-05T16:31:46.3166667+00:00

When attempting to remove the role, we are met with an error stating the role was failed to be removed. The role is currently not in use061c51f0-996e-4394-8ee7-35c4eb305c59

Azure Role-based access control
Azure Role-based access control

An Azure service that provides fine-grained access management for Azure resources, enabling you to grant users only the rights they need to perform their jobs.


1 answer

Sort by: Most helpful
  1. Allan Solomon Mejia 3,430 Reputation points
    2026-08-06T03:16:11.7033333+00:00

    Hi @IT

    This error can occur even if the role isn't currently assigned to any principal. Before deleting the custom role, I'd recommend checking a few things:

    • Verify the role isn't assigned at any scope (management group, subscription, resource group, or resource) using Access control (IAM) > Role assignments or Azure CLI:
      • az role assignment list --role "prisma-cloud-policy-agentless-write-stmoy"
    • Confirm the role isn't referenced by an Azure Blueprint, deployment script, or Azure Policy that may be recreating or locking it.
    • Ensure you're connected to the correct subscription and have sufficient permissions (such as Owner or User Access Administrator) to manage custom role definitions.
    • If the role was recently modified or unassigned, wait a few minutes and try again, as RBAC changes can take time to propagate.
    • If the issue persists, try deleting the role using Azure CLI:
      • az role definition delete --name "prisma-cloud-policy-agentless-write-stmoy"

    If the CLI returns a more specific error (for example, that the role is still in use or another dependency exists), sharing the full error message would help narrow down the root cause.

    Please "Accept the Answer" if this information helped you. This will help us and others in the community as well.

    Was this answer helpful?


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.