שאילתות לדוגמה של מלאי ב- Power Platform

השאילתות לדוגמה הבאות פועלות מול הטבלה PowerPlatformResources ב- Azure Resource Graph. הם מכסים ספירה והפצה של משאבים, גילוי שדות, בדיקות מידע של משאבים וניתוח שימוש במחברים. לקבלת מבט כולל על מלאי 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]"

עצה

באפשרותך למצוא את מזהה הסוכן בכתובת ה- URL של Studio Copilot בעת הצגת הסוכן, או בעמודה שם של טבלת המלאי.

ספירת סוכנים לפי סביבה

מציג פירוט של סוכנים שנוצרו באמצעות ההרתמה של Microsoft Copilot, ההרתמה של Copilot Chat או מסגרת רגילה.

תוכל לראות את ה-Harness של סוכן בעמודה Harness במרכז הניהול של Power Platform, תחת Manage>Copilot Studio. עמודה זו היא עמודת ממשק משתמש בלבד. הרתמה עדיין לא מוחזרת כמטה-נתונים של סוכן, ולכן שאילתה זו מפיקה אותה מהשדות שהמלאי מחזיר: properties.isCLIAgent, properties.modelו- properties.createdIn. כאשר השדה properties.harness הופך לזמין, באפשרותך לבצע בו שאילתה ישירות במקום זאת. הגדרות השדה זמינות בסכימת המלאי של סוכן Microsoft Copilot Studio.

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

הצג רשימה של סוכנים עם מעטפת ההרצה שלהם

מחזירה שורה אחת לכל סוכן עם הרתמה שלה, כך שתוכל למצוא סוכנים בודדים ופעל לפיהם במקום לספור אותם בלבד. הסר את ההערה מהשורה where כדי להחזיר רק את הסוכנים שנבנו באמצעות רתמת Microsoft Copilot.

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

פריטים שנוצרו ב- 24 השעות האחרונות

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

שאילתות ב-Power Pages (תצוגה מקדימה)

שאילתות Power Pages משתמשות בסוג המשאב microsoft.powerpages/sites. מלאי Power Pages זמין רק למנהלי מערכת כלליים, למנהלי מערכת של Power Platform ולמנהלי מערכת של Dynamics 365.

רשימה של אתרי Power Pages

שאילתה זו מחזירה מלאי ברמת הדייר של אתרי Power Pages עם הסביבה, הבעלים ותאריכי היצירה והשינוי שלהם.

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

ספירת אתרי Power Pages לפי סביבה

שאילתה זו מציגה אילו סביבות מכילות את מספר אתרי Power Pages הגדול ביותר.

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

ספירת אתרי Power Pages לפי בעלים

שאילתה זו מציגה בעלים המשויכים למספר הגדול ביותר של אתרי Power Pages כדי לתמוך בביקורות בעלות ובתכנון המשכיות עסקית.

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

Power Pages אתרים עם גישה אנונימית זמינה

שאילתה זו מוצאת אתרים שמטה-הנתונים של המלאי שלהם מציינים כי גישה אנונימית מותרת.

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

אתרי Power Pages שנוצרו לאחרונה

שאילתה זו מחזירה אתרים שנוצרו במהלך 30 הימים האחרונים. התאם את מרווח הזמן לפי הצורך.

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

אתרי Power Pages המשתמשים בתחום מותאם אישית

שאילתה זו מחזירה אתרים שמטה-הנתונים של המלאי שלהם כוללים כתובת URL מותאמת אישית של אתר.

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

Power Pages עם משאבים אחרים של Power Platform

שאילתה זו מסכמת את ספירות המשאבים לפי סוג וסביבה ברחבי Power Platform, כולל אתרי Power Pages. רשומות ללא מזהה סביבה אינן נכללות.

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

שאילתות בנושא מחברים

השאילתות הבאות מנתחות את השימוש במחברים בסוגי המשאבים שמכוסים על-ידי מלאי המחברים. כל שאילתה שפועלת במערך properties.powerPlatformConnectors שנפלט על-ידי יישומי בד ציור, יישומים מונחי דגמים, יישומים שפותחו בסביבת זמן ריצה שמנוהלת של Copilot, זרימות ענן, זרימות סוכן, זרימות סוכן של זרימת עבודה, סוכני Copilot Studio במנגנון רגיל או במסגרת Microsoft Copilot וסוכנים שנוצרו ב-Microsoft 365 Copilot Agent Builder. יישומים שפותחו ב-Copilot managed runtime משתמשים בסוג microsoft.powerapps/apps עם סוג המשנה microsoftApp. השאילתות אינן כוללות אפליקציות של App Builder, המשתמשות באותו סוג אך אינן פולטות נתוני connector.

מחברים מובילים שנמצאים בשימוש במשאבי Power Platform

פירוט המחברים המשמשים את המשאבים הייחודיים ביותר. שימושי להבנת אילו מחברים מובילים באימוץ בכל הדייר.

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

התפלגות של ספירת מחברים לכל משאב

מראה כמה משאבים משתמשים במחברים 0, 1, 2 או יותר. שימושי עבור איתור חריגים במורכבות.

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

איתור כל המשאבים המשתמשים במחבר ספציפי

החלף shared_sharepointonline במחבר שברצונך לחפש. שאילתה זו שימושית לניתוח השפעה כאשר מחבר מחזיק בבעיה ידועה, אינו נמצא עוד בשימוש או דורש רישוי חדש.

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

שימוש במחברים לפי סביבה

פירוט כל מחבר המשמש בכל סביבה, עם ספירת המשאבים הייחודיים המשתמשים בו. רשימה זו שימושית להבנת דפוסי הטמעה ולתיידע את החלטות מדיניות DLP.

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