How can I identify if these service principles are related to which resources ?

Satish Kumar (EXT-Nokia) 0 Reputation points
2025-06-14T07:49:47.6866667+00:00

I have deleted Azure Resources group along with all resources manually. Now I can see 2 Service principal left behind. How can I identify if these service principles are related to any other resource which may still exist?

If I delete these service principles, will it impact any other application or resources.

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.
945 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Patchfox 4,096 Reputation points
    2025-06-14T09:09:40.8066667+00:00

    Hi Satish Kumar (EXT-Nokia), I wan to help you with this question.

    There are multiple solutions for:

    1.) Use Azure Resource Graph Explorer (search for the service in Azure via the search bar):

    The Following Query will get you all existing assignments:

    Resources

    | where type == "microsoft.authorization/roleassignments"

    | where properties.principalId == "<ServicePrincipalID>"

    Another option is to use the Azure CLI:

    az role assignment list --all --assignee <Pricipal_ID>
    
    

    I hope this to solutions help you to answer your question.


    If the reply was helpful, please don’t forget to upvote or accept it as an answer, thank you!

    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.