@Aditya Mediratta , thank you for your question.
There is currently no out-of-the-box feature available to:
permanently disable Preview features in Azure
To unregister Preview features you can follow the instructions shared here.
You can, however, create an Azure Policy definition with Policy Rule as follows:
{
"mode": "All",
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Features/providers/features"
},
"then": {
"effect": "deny"
}
},
"parameters": {}
}
This will prevent operations on any preview feature under Azure Feature Exposure Control (AFEC), available through the Microsoft.Features namespace. For more information please check the following:
Or
Alternatively, deny particular users or management groups the Azure RBAC permission Microsoft.Features/providers/features/register/action
In-case any Preview feature has been marked registered - how to identify who registered it and when ?
You can check this easily from the Azure Subscription's Activity Logs as shown below:
- Navigate to the Azure Subscription on the Azure Portal:
- Go to Activity Log from the left-hand menu. Add a filter
Operation : Register Provider Feature (Microsoft.Features/providers/features/register/action)
. You can optionally set the appropriate Timespan filter to narrow down the logs to a specific time span. In the Event initiated by column of the output you shall find the entity that registered the feature and in the Time stamp column you will find the timestamp of the operation.
- You can further click on an entry upon which you shall find the JSON view of the operation, to check the
resourceId
field which shall give you the name of the feature andcaller
andclaims
fields for more information on the entity who initiated the operation .
----
Hope this helps.
Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.