Power Platform 인벤토리 샘플 쿼리

다음 샘플 쿼리는 Azure Resource Graph PowerPlatformResources 테이블에 대해 실행됩니다. 리소스 계산 및 배포, 필드 검색, 리소스 조회 및 커넥터 사용 현황 분석을 다룹니다. Power Platform 인벤토리에 대한 개요는 Power Platform 인벤토리를 참조하세요. 스키마 및 필드 참조는 Power Platform 인벤토리 스키마 참조를 참조하세요.

이러한 쿼리를 실행하는 방법

Azure Resource Graph 인터페이스에서 이러한 쿼리를 실행할 수 있습니다. 단계별 지침은 다음 빠른 시작 가이드를 참조하세요.

개수 및 분포

모든 리소스의 총 수

PowerPlatformResources
| count

리소스 종류별 총 개수

PowerPlatformResources
| summarize resourceCount = count() by type
| order by resourceCount

환경별 개수

PowerPlatformResources
| extend properties = parse_json(properties)
| extend environmentId = tostring(properties.environmentId)
| summarize resourceCount = count() by environmentId
| order by resourceCount desc

지역별 개수

PowerPlatformResources
| summarize resourceCount = count() by location
| order by resourceCount desc

항목 수별 상위 소유자

PowerPlatformResources
| extend properties = parse_json(properties)
| extend ownerId = tostring(properties.ownerId)
| summarize resourceCount = count() by ownerId
| order by resourceCount desc

리소스 조회

테넌트에서 단일 에이전트 찾기

PowerPlatformResources
| where type == "microsoft.copilotstudio/agents"
| where name == "[Enter the agent's ID]"

Tip

에이전트를 볼 때 Copilot Studio URL 또는 인벤토리 테이블의 이름 열에서 에이전트의 ID를 찾을 수 있습니다.

지난 24시간 동안 만든 항목

PowerPlatformResources
| extend properties = parse_json(properties)
| extend createdAt = todatetime(properties.createdAt)
| where createdAt >= ago(24h)

커넥터 쿼리(미리 보기)

다음 쿼리는 커넥터 인벤토리(미리 보기)에서 다루는 리소스 유형에서 커넥터 사용량을 분석합니다. 각 쿼리는 캔버스 앱, 모델 기반 앱, 클라우드 흐름, 에이전트 흐름, 워크플로 에이전트 흐름 및 Copilot Studio 에이전트에서 내보내는 properties.powerPlatformConnectors 배열에서 작동합니다.

Power Platform 리소스에서 사용되는 상위 커넥터

가장 고유한 리소스에서 사용하는 커넥터를 나열합니다. 테넌트 전체에서 채택을 지배하는 커넥터를 이해하는 데 유용합니다.

PowerPlatformResources
| where type in (
    "microsoft.powerapps/canvasapps",
    "microsoft.powerapps/modeldrivenapps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| mv-expand connector = properties.powerPlatformConnectors
| extend connectorId = tostring(connector.connectorId)
| where isnotempty(connectorId)
| summarize ResourceCount = dcount(name) by connectorId
| order by ResourceCount desc
| take 10

리소스당 커넥터 수 분포

0, 1, 2 이상의 커넥터를 사용하는 리소스 수를 보여 줍니다. 복잡도 이상치를 식별하는 데 유용합니다.

PowerPlatformResources
| where type in (
    "microsoft.powerapps/canvasapps",
    "microsoft.powerapps/modeldrivenapps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| extend connectorCount = array_length(properties.powerPlatformConnectors)
| summarize ResourceCount = count() by toint(connectorCount)
| order by connectorCount asc

특정 커넥터를 사용하는 모든 리소스 찾기

shared_sharepointonline를 검색하려는 커넥터로 바꾸세요. 이 쿼리는 커넥터에 알려진 문제가 있거나, 사용되지 않거나, 새 라이선스가 필요한 경우 영향 분석에 유용합니다.

PowerPlatformResources
| where type in (
    "microsoft.powerapps/canvasapps",
    "microsoft.powerapps/modeldrivenapps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| mv-expand connector = properties.powerPlatformConnectors
| where tostring(connector.connectorId) == "shared_sharepointonline"
| project resourceName = tostring(properties.displayName),
          resourceId = name,
          resourceType = type,
          environmentId = tostring(properties.environmentId),
          operationsUsed = connector.operations

환경별 커넥터 사용량

모든 환경에서 사용되는 모든 커넥터를 사용하는 고유 리소스 수와 함께 나열합니다. 이 목록은 채택 패턴을 이해하고 DLP 정책 결정을 알리는 데 유용합니다.

PowerPlatformResources
| where type in (
    "microsoft.powerapps/canvasapps",
    "microsoft.powerapps/modeldrivenapps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| mv-expand connector = properties.powerPlatformConnectors
| extend connectorId = tostring(connector.connectorId)
| where isnotempty(connectorId)
| extend environmentId = tostring(properties.environmentId)
| summarize ResourceCount = dcount(name) by environmentId, connectorId
| order by environmentId asc, ResourceCount desc