SOLVED: Error message ResourceTypeNotSupported "Unsupported resource type: 'Microsoft.PolicyInsights/policyStates/summarize'" using the Azure REST API.

To generate a state summary of a of an Azure policy assignment you can use the Azure PowerShell cmdlet Get-AzPolicyStateSummary.

However when you call this using REST you get the error

https://management.azure.com/Subscriptions/{{subscriptionId}}/providers/Microsoft.Authorization/policyAssignments/SecurityCenterBuiltIn/providers/Microsoft.PolicyInsights/policyStates/latest/summarize?api-version=2019-10-01

{
    "error": {
        "code""ResourceTypeNotSupported",
        "message""Unsupported resource type: 'Microsoft.PolicyInsights/policyStates/summarize'."
    }
}


This is because the method must be called with the verb POST (not GET).

Comments

Popular posts from this blog

Windows Server 2016, 2019, 2022, Windows 10 and Windows 11: Date and time "Some settings are managed by your organization".

TFTPD32 or TFTPD64 reports Bind error 10013 An attempt was made to access a socket in a way forbidden by its access permissions.

Enable function lock for F1-F12 on HP ZBook mobile workstations