Tao Yang , How did you get policy_policyDefinitionName field to show the actual name of the policy instead of just the ID ? I get the ID in that field regardless of whether it is a custom policy or a built-in one.
EDIT: answered my own question - creating custom policies through the portal results in the 'name' attribute being assigned the definition ID. Same thing happens when duplicating definitions and customizing them later on.
Creating the custom policy with PowerShell sets the name correctly. I used the following: New-AzPolicyDefinition -Name "<PolicyName>" -DisplayName "<PolicyDisplayName>" -Policy <Policy JSON file>.
I've yet to test that with the ARMClient, but suspect the result will be the same using the below:
# For defining a policy in a subscription armclient
PUT "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyDefinitions/AuditStorageAccounts?api-version=2019-09-01" @<path to policy definition JSON file>
# For defining a policy in a management group armclient
PUT /providers/Microsoft.Management/managementgroups/{managementGroupId}/providers/Microsoft.Authorization/policyDefinitions/AuditStorageAccounts?api-version=2019-09-01" @<path to policy definition JSON file>