Hi Sparsh
Due to unavailability of Policy Alias, the policy cannot be applied to Audit the subscription offer type.
Since your goal is to list all Trial subscriptions, you can use Azure Resource Graph(https://learn.microsoft.com/en-us/azure/governance/resource-graph/overview) as an easy alternative to get the list of Trial subscriptions or any other type.
Since using ARG, REST API or other clients we can get only Quota ID and not the offer type, we have used the filter on Quota ID in the below query. Quota ID is unique for every offer name and number so you can easily query them and match it will offer details mentioned here: https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/understand-cost-mgt-data#supported-microsoft-azure-offers
Category | Offer Name | Quota ID | Offer Number | Data Available From |
---|---|---|---|---|
Pay-as-you-go | Free Trial² | FreeTrial_2014-09-01 | MS-AZR-0044P | October 2, 2018 |
Query:
resourcecontainers
| where type == "microsoft.resources/subscriptions"
| where properties.subscriptionPolicies.quotaId contains "FreeTrial" // comment: remove this line if you want to fetch all the subscription details
| project subscriptionId,id,name,tenantId,state =properties.state,Quota=properties.subscriptionPolicies.quotaId