Skip to content

OLE DB ERROR in Governance report when querying for PolicyDefinitions #1539

Description

@robbdi

🐛 Problem

When refreshing the Governance (Storage or KQL) report, I receive the following error:

Image

👣 Repro steps

  1. Open governance.storage
  2. Fill in required information
  3. Select Load
  4. See error

ℹ️ Possible Fix

Change the query for PolicyDefinitions to 'project' instead of 'extend'. Here's a working query:

let
query = "
policyResources
| where type =~ 'Microsoft.Authorization/PolicySetDefinitions' or type =~ 'Microsoft.Authorization/PolicyDefinitions'
| project
id,
name,
type,
displayName = properties.displayName,
policyType = properties.policyType,
description = properties.description,
version = properties.version,
metadata = tostring(properties.metadata),
parameters = tostring(properties.parameters),
policyDefinitions = tostring(properties.policyDefinitions),
policyDefinitionGroups = tostring(properties.policyDefinitionGroups),
versions = tostring(properties.versions),
oldVersions = tostring(properties.oldVersions)
" & ftk_DemoFilter(),
Source = AzureResourceGraph.Query(query, "Tenant", null, null, [resultTruncated = false])
in
Source

Metadata

Metadata

Assignees

Labels

Type

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions