Power Platform envanteri örnek sorguları

Aşağıdaki örnek sorgular Azure Kaynak Grafı içindeki PowerPlatformResources tablosunda çalıştırılır. Bunlar kaynak sayma ve dağıtım, alan bulma, kaynak aramaları ve bağlayıcı kullanımı analizini kapsar. Power Platform envanteri hakkında genel bilgi için bkz. Power Platform envanteri. Şema ve alan başvurusu için bkz. Power Platform envanter şeması başvurusu.

Bu sorgular nasıl çalıştırılır

Bu sorgulardan herhangi birini Azure Kaynak Grafı arabirimlerinden çalıştırabilirsiniz. Adım adım yönergeler için aşağıdaki hızlı başlangıç kılavuzlarını inceleyin:

Sayımlar ve dağıtım

Tüm kaynakların toplam sayısı

PowerPlatformResources
| count

Kaynak türüne göre toplam sayımlar

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

Ortama göre sayımlar

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

Bölgeye göre sayımlar

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

Öğe sayısına göre en iyi sahipler

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

Kaynak aramaları

Tenant içinde tek bir ajan bulun

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

Tip

Aracıyı görüntülerken Copilot Studio URL'sinde veya stok tablosunun Ad sütununda aracının kimliğini bulabilirsiniz.

Aracıları altyapıya göre sayma

GitHub Copilot harness, Copilot Chat harness veya Standard harness ile oluşturulan ajanların dökümünü gösterir.

Bir aracının donanımını, Power Platform yönetim merkezinde Yönet>Copilot Studio altında bulunan Donanım sütununda görebilirsiniz. Bu sütun yalnızca kullanıcı arabirimi sütunudur. Harness henüz aracı meta verisi olarak döndürülmediği için bu sorgu, bunu envanterin döndürdüğü şu alanlardan türetir: properties.isCLIAgent, properties.model ve properties.createdIn. properties.harness alanı kullanılabilir hale geldiğinde, bunun yerine doğrudan sorgulayabilirsiniz. Alan tanımları için bkz. Microsoft Copilot Studio Aracısı envanter şeması.

PowerPlatformResources
| where type == "microsoft.copilotstudio/agents"
| extend properties = parse_json(properties)
| extend
    isCLIAgent = tobool(properties.isCLIAgent),
    model = tostring(properties.model),
    createdIn = tostring(properties.createdIn)
| extend harness = case(
    isCLIAgent == true, "GitHub Copilot",
    model =~ "Microsoft 365 Copilot" or createdIn =~ "Microsoft 365 Copilot Agent Builder", "Copilot Chat",
    "Standard")
| summarize agentCount = count() by harness
| order by agentCount desc

Aracıları kendi altyapılarıyla listeleme

Aracı başına bir satır döndürür ve bu sayede aracıları saymak yerine tek tek aracıları bulup üzerinde işlem yapabilirsiniz. Yalnızca GitHub Copilot altyapısıyla oluşturulan aracıları döndürmek için where satırının yorum satırını kaldırın.

PowerPlatformResources
| where type == "microsoft.copilotstudio/agents"
| extend properties = parse_json(properties)
| extend
    isCLIAgent = tobool(properties.isCLIAgent),
    model = tostring(properties.model),
    createdIn = tostring(properties.createdIn)
| extend harness = case(
    isCLIAgent == true, "GitHub Copilot",
    model =~ "Microsoft 365 Copilot" or createdIn =~ "Microsoft 365 Copilot Agent Builder", "Copilot Chat",
    "Standard")
//| where harness == "GitHub Copilot"
| project agentName = tostring(properties.displayName),
          agentId = name,
          harness,
          environmentId = tostring(properties.environmentId),
          ownerId = tostring(properties.ownerId),
          createdAt = todatetime(properties.createdAt)
| order by harness asc, createdAt desc

Son 24 saat içinde oluşturulan öğeler

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

Power Pages sorguları (önizleme)

Power Pages sorguları microsoft.powerpages/sites kaynak türünü kullanır. Power Pages envanteri yalnızca Genel yöneticiler, Power Platform yöneticileri ve Dynamics 365 yöneticileri için kullanılabilir.

Power Pages sitelerini listeleme

Bu sorgu, ortamları, sahipleri ve oluşturma ve değiştirme tarihleriyle Power Pages sitelerinin kiracı genelinde bir envanterini döndürür.

PowerPlatformResources
| where type =~ "microsoft.powerpages/sites"
| extend properties = parse_json(properties)
| project siteName = tostring(properties.displayName),
    siteId = name,
    environmentId = tostring(properties.environmentId),
    ownerId = tostring(properties.ownerId),
    createdOn = todatetime(properties.createdAt),
    lastModifiedOn = todatetime(properties.lastModifiedAt)
| order by siteName asc

Ortama göre Power Pages siteleri sayma

Bu sorgu, en fazla Power Pages sitesi içeren ortamları gösterir.

PowerPlatformResources
| where type =~ "microsoft.powerpages/sites"
| extend properties = parse_json(properties)
| extend environmentId = tostring(properties.environmentId)
| summarize siteCount = count() by environmentId
| order by siteCount desc

Sahibine göre Power Pages sitelerini say

Bu sorgu, sahiplik gözden geçirmelerini ve iş sürekliliği planlamasını desteklemek için en fazla sayıda Power Pages sitesiyle ilişkili sahipleri gösterir.

PowerPlatformResources
| where type =~ "microsoft.powerpages/sites"
| extend properties = parse_json(properties)
| extend ownerId = tostring(properties.ownerId)
| summarize siteCount = count() by ownerId
| order by siteCount desc

Anonim erişimin etkinleştirildiği Power Pages siteleri

Bu sorgu, envanter meta verileri anonim erişime izin verildiğini gösteren siteleri bulur.

PowerPlatformResources
| where type =~ "microsoft.powerpages/sites"
| extend properties = parse_json(properties)
| extend anonymousAccessEnabled = tobool(properties.anonymousAccessAllowed)
| where anonymousAccessEnabled == true
| project siteName = tostring(properties.displayName),
    siteId = name,
    environmentId = tostring(properties.environmentId),
    websiteUrl = tostring(properties.siteUrl)
| order by siteName asc

Yakın zamanda oluşturulan Power Pages siteleri

Bu sorgu, son 30 gün boyunca oluşturulan siteleri döndürür. Aralığı gerektiği gibi ayarlayın.

PowerPlatformResources
| where type =~ "microsoft.powerpages/sites"
| extend properties = parse_json(properties)
| extend createdOn = todatetime(properties.createdAt)
| where createdOn >= ago(30d)
| project siteName = tostring(properties.displayName),
    siteId = name,
    environmentId = tostring(properties.environmentId),
    ownerId = tostring(properties.ownerId),
    createdOn
| order by createdOn desc

Özel etki alanlarını kullanan Power Pages siteleri

Bu sorgu, envanter meta verileri özel bir site URL'si içeren siteleri döndürür.

PowerPlatformResources
| where type =~ "microsoft.powerpages/sites"
| extend properties = parse_json(properties)
| extend customDomain = tostring(properties.customSiteUrl)
| where isnotempty(customDomain)
| project siteName = tostring(properties.displayName),
    siteId = name,
    environmentId = tostring(properties.environmentId),
    websiteUrl = tostring(properties.siteUrl),
    customDomain
| order by siteName asc

Diğer Power Platform kaynaklarıyla Power Pages

Bu sorgu, Power Pages siteleri de dahil olmak üzere Power Platform genelindeki türe ve ortama göre kaynak sayılarını özetler. Ortam kimliği olmayan kayıtlar dışlanır.

PowerPlatformResources
| extend properties = parse_json(properties)
| extend environmentId = tostring(properties.environmentId)
| where isnotempty(environmentId)
| summarize resourceCount = count() by environmentId, type
| order by environmentId asc, resourceCount desc

Bağlayıcı sorguları

Aşağıdaki sorgular, Bağlayıcı envanteri kapsamındaki kaynak türleri genelinde bağlayıcı kullanımını analiz ediyor. Her sorgu, tuval uygulamaları, model temelli uygulamalar, Copilot yönetilen çalışma zamanında oluşturulan uygulamalar, bulut akışları, aracı akışları, iş akışı aracı akışları, Standart koşum veya GitHub Copilot koşumunda Copilot Studio aracıları ve Microsoft 365 Copilot Agent Builder'da oluşturulan aracılar tarafından yayılan properties.powerPlatformConnectors dizisi üzerinde çalışır. Copilot yönetilen çalışma zamanında oluşturulan uygulamalar, microsoftApp türünü microsoft.powerapps/apps alt türüyle kullanır. Sorgular, aynı türü kullanan ancak bağlayıcı verilerini yaymayan App Builder uygulamalarını dışlar.

Power Platform kaynakları arasında kullanılan en iyi bağlayıcılar

En farklı kaynaklar tarafından kullanılan bağlayıcıları listeler. Kiracı genelinde benimsemeye hakim bağlayıcıları anlamak için kullanışlıdır.

PowerPlatformResources
| where type in (
    "microsoft.powerapps/canvasapps",
    "microsoft.powerapps/modeldrivenapps",
    "microsoft.powerapps/apps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| where type != "microsoft.powerapps/apps" or tostring(properties.subType) == "microsoftApp"
| 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

Kaynak başına bağlayıcı sayısının dağılımı

Kaç kaynağın 0, 1, 2 veya daha fazla bağlayıcı kullandığını gösterir. Karmaşıklık açısından aykırı değerleri saptamak için kullanışlıdır.

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

Belirli bir bağlayıcıyı kullanan tüm kaynakları bulma

yerine shared_sharepointonline aramak istediğiniz bağlayıcıyı yazın. Bu sorgu, bağlayıcının bilinen bir sorunu olduğunda, kullanım dışı bırakıldığında veya yeni lisanslama gerektirdiğinde etki analizi için yararlıdır.

PowerPlatformResources
| where type in (
    "microsoft.powerapps/canvasapps",
    "microsoft.powerapps/modeldrivenapps",
    "microsoft.powerapps/apps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| where type != "microsoft.powerapps/apps" or tostring(properties.subType) == "microsoftApp"
| 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

Ortama göre bağlayıcı kullanımı

Her ortamda kullanılan her bağlayıcıyı, kullanan farklı kaynakların sayısıyla birlikte listeler. Bu liste benimseme desenlerini anlamak ve DLP ilke kararlarını bilgilendirmek için kullanışlıdır.

PowerPlatformResources
| where type in (
    "microsoft.powerapps/canvasapps",
    "microsoft.powerapps/modeldrivenapps",
    "microsoft.powerapps/apps",
    "microsoft.powerautomate/cloudflows",
    "microsoft.powerautomate/agentflows",
    "microsoft.powerautomate/m365agentflows",
    "microsoft.copilotstudio/agents")
| extend properties = parse_json(properties)
| where type != "microsoft.powerapps/apps" or tostring(properties.subType) == "microsoftApp"
| 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