How to Identify and Manage Unknown Managed Identities and Service Principals at the Subscription Level?

September 21, 2025 8 answers
Asked by whats a gerund
I've noticed some unknown managed identities and service principals assigned as owners and contributors at the subscription level. Their names seem like random strings of characters and numbers, which makes it hard to identify their purpose. I'm trying to figure out how to determine if we can safely remove them or what might happen if we unassign these roles. Any advice on how to investigate this?

Answers

T6.busprobe
c
Reply to this answer
!15 minutes early
Make sure to check if these are 'Foreign Groups' before deleting them. If they are, it's better to leave them alone as they might impact something in ways you can't predict right now.

whats a gerund: Interesting! Actually, the Type column does say Managed Identity, and when I click on it, it redirects me to an Enterprise Application with the same name but no sign-in activity. Does that change anything?

Reply to this answer
maple syrup test!
a
Reply to this answer
dockside.notice
If you're using a Cloud Service Provider, check if the assigned principal ID shows up in your Entra Tenant when you run Get-AzRoleAssignment or az role assignment list. That can tell you a lot about whether it's safe to remove them.
Reply to this answer
6minute break
C
Reply to this answer
telescope collimation
One good way to start is by checking their sign-in logs and activity logs. This will help you see if they've actually done anything or if they're just sitting there inactive. If you notice no activity tied to them, that might give you more confidence in possibly removing their roles.
Reply to this answer
~open bracket
J
Reply to this answer
meringues
r
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions