Forum Discussion
adampra86
Sep 01, 2022Copper Contributor
process for Azure subscription retirement
Hi all, I'm wondering what processes/workflows you have in place for retiring (deleting) no more needed subscriptions. I was thinking about stuff like this: Financial reporting cleanup RBAC c...
iamneeraj
Oct 25, 2022Learn Expert
You can also run this query on Azure resource graph explorer to get a list of resources before you delete them or go to Resource Explorer and see the resources via GUI
Query
//Gets a list of Resources in your Subscription
Resources
| join kind=leftouter (ResourceContainers | where type=='microsoft.resources/subscriptions' | project SubName=name, subscriptionId) on subscriptionId
| project type, name, SubName
besides this
-Remove RBAC
-Delete Tags
-Remove any locks
-check Billing information
Query
//Gets a list of Resources in your Subscription
Resources
| join kind=leftouter (ResourceContainers | where type=='microsoft.resources/subscriptions' | project SubName=name, subscriptionId) on subscriptionId
| project type, name, SubName
besides this
-Remove RBAC
-Delete Tags
-Remove any locks
-check Billing information