Skip to content

Instantly share code, notes, and snippets.

@starkfell
starkfell / cleanup-role-assignments-for-non-existing-principals.sh
Last active January 24, 2024 08:07
Delete Role Assignments for deleted or non-existing Managed Identities, Service Principals, Groups, and Users
#!/bin/bash
: '
Name: cleanup-role-assignments-for-non-existing-principals.sh
Author: Ryan Irujo
Description: This scripts is for resolving the issue in the article below.
https://learn.microsoft.com/en-us/answers/questions/672875/azure-managed-identity-role-assignment-is-not-dele