This is a sample. This solution demonstrates how the Microsoft Graph Package Management API can be used with Power Automate to sync your tenant's Copilot agent inventory to a SharePoint list — giving IT admins a familiar, filterable, and shareable view of all agents without writing code.
It is intended as a reference implementation and starting point, not a production-ready solution.
This is an unmanaged Power Platform solution containing:
| Component | Description |
|---|---|
| Power Automate flow | A manually-triggered instant cloud flow that calls the Package Management API and creates an item in a SharePoint list for each Copilot agent. |
| Custom connector | The same Copilot Agent Catalog custom connector — included in the solution for convenience. After import, you will need to configure it with your Entra ID app registration credentials and create a connection. |
Once imported and configured, triggering the flow populates your SharePoint list with the current agent inventory, ready for filtering, reporting, or feeding into downstream governance processes.
- A Microsoft 365 tenant with Microsoft 365 Copilot licences
- Access to the Package Management API — requires an Agent 365 license.
- An Entra ID app registration configured with the
CopilotPackages.Read.Alldelegated permission (see the Catalog Connector setup guide for instructions). - A Power Platform environment with permissions to import solutions (Environment Maker role or higher).
- The user account running the flow must hold the Global Administrator or AI Administrator role.
- A SharePoint site where you have permission to create lists.
If you haven't already, create an app registration by following the instructions in the Catalog Connector deployment guide. You will need the Client ID, Client secret, and Tenant ID for step 4.
-
Navigate to your target SharePoint site.
-
Select + New > List > Blank list.
-
Give the list a name (e.g.
Agents) and select Create. -
Add the following columns to the list. Select + Add column or Create column for each:
Column name Type Short Description Multiple lines of text Blocked Yes/No Last Modified Date and Time Agent Type Choice Instructions Multiple lines of text Long Description Multiple lines of text Capabilities Multiple lines of text Graph Connector Ids Multiple lines of text Websites Multiple lines of text Id Single line of text Owner Person or Group ODSP Sites Multiple lines of text Suggested Prompts Multiple lines of text Discourage Model Knowledge Yes/No Available To Single line of text Deployed To Single line of text
After creating the columns, add the choice values for the Agent Type column:
- Select the Agent Type column header.
- Select Column settings > Edit.
- Under Choices, add the following values:
Agent BuilderCopilot StudioLOBUnknown
- Select Save.
Apply the provided column formatting JSON to improve the visual appearance of key columns:
- In the SharePoint list, select the Capabilities column header.
- Select Column settings > Format this column.
- In the formatting pane, select Advanced mode.
- Delete any existing content and paste the contents of
column-formatting/capabilities.json. - Select Save.
This displays each capability (e.g. WebSearch, Email, OneDriveAndSharePoint) as a colour-coded pill/badge.
- Select the Graph Connector Ids column header.
- Select Column settings > Format this column.
- In the formatting pane, select Advanced mode.
- Delete any existing content and paste the contents of
column-formatting/graph-connector-ids.json. - Select Save.
This displays connector IDs as a styled badge when present, or a dash when the field is empty.
-
Go to make.powerautomate.com and select your target environment.
-
Navigate to Solutions > Import solution.
-
Select Browse and upload the
CopilotAgentInventorySync_1_0_0_0.zipfile. -
You will be prompted to set Environment Variables. Configure them as follows:
Variable Value Inventory Sync SharePoint Site Select the SharePoint site where you created the list in step 2. Inventory Sync Agents List Select the SharePoint list you created in step 2 (e.g. Agents). -
Select Import.
The solution includes the custom connector, but you need to configure its OAuth credentials and create a connection. Follow steps 2 onwards from the Catalog Connector deployment guide:
- Configure OAuth 2.0 authentication — edit the imported connector's Security tab and enter your Client ID, Client secret, Tenant ID, and Resource URL from your Entra ID app registration (step 1).
- Create a connection and test — create a new connection and verify it works by testing the Get Copilot Packages operation.
- Once you have a working connection, return to the imported solution in Solutions. Find the Inventory Sync Copilot Packages Connection connection reference, select Edit, and update it to use the connection you just created.
- Navigate to the Get Copilot Packages flow within the solution.
- Select Run to trigger a sync.
Note: The flow run may report as failed if one or more agent owner IDs cannot be resolved to a user in your directory. Despite the failure status, agents that were processed before the error will still have been synced to the SharePoint list — only the agents where the owner could not be resolved will be missing. This is a known limitation and will be fixed in a future update.
- The flow is triggered manually.
- It calls the custom connector's Get Copilot Packages action to retrieve all agents.
- For each agent in the response, it creates a new item in the configured SharePoint list with the agent's metadata mapped to the list columns.
Note: The flow creates new items on each run. It does not update or deduplicate existing entries. To maintain a clean list, clear existing items before re-running, or extend the flow with upsert logic as needed.
- Items are processed synchronously with a concurrency control of 1 (the default) to avoid API rate limits. This means large tenants with many agents may experience longer run times.
- The flow creates new list items only — it does not update existing entries if an agent's metadata has changed.
- The flow may fail if an agent's owner ID cannot be resolved (see Run the flow note above).
The following are improvements you could make to extend this sample:
| Enhancement | Description |
|---|---|
| Separate into parent/child flows | Split the solution so a parent flow calls Get Copilot Packages and a child (sub) flow retrieves the detail for each agent. This allows the child flow to run with higher concurrency without hitting API rate limits on the list operation. |
| Upsert logic | Enhance the flow to check whether an agent already exists in the SharePoint list (by ID) and update the existing item rather than creating a duplicate. |
| Increase concurrency | Once separated into parent/child flows, increase the concurrency control on the child flow to process multiple agents in parallel. |
| Scheduled trigger | Replace the manual trigger with a scheduled recurrence (e.g. daily) to keep the inventory list automatically up to date. |
The following features are planned for future releases of this sample:
- Teams notifications — notify administrators via Teams when new agents are created or existing agents are modified.
- Automated blocking — automatically block agents that do not meet governance criteria (e.g. missing attestation, no owner).
- Automated deletion — remove or archive agents that are orphaned or unused beyond a defined period.
- Owner resolution fix — handle unresolvable owner IDs gracefully so the flow completes successfully for all agents.
- Microsoft Graph Package Management API
- Import a Power Platform solution
- SharePoint list column formatting
- Catalog Connector sample
MIT — see LICENSE for details.
Note: This sample is community-maintained and is not covered by a Microsoft support SLA.
