Recommended way to inventory Copilot Studio and Foundry agents programmatically

Ashok Reddy Kommasani 0 Reputation points
2026-11-30T14:56:30.99+00:00

Hi team,

We're building an app-only (client credentials) integration that lists our tenant's Copilot Studio and Foundry agents. We'd like your recommendation on the supported approach.

What we see today

  • The Agent 365 catalog (GET /v1.0/copilot/admin/catalog/packages) lists the agents, but has no Copilot Studio environment or Foundry project information, and can't be filtered by either.
  • Dataverse has the environment data, but needs an application user in every environment.
  • Azure Resource Graph returns all Copilot Studio agents and Foundry projects in one query, but its inventory schema and several fields are marked preview.

Questions

  1. Which source do you recommend for programmatic agent inventory: the catalog, Dataverse, or Resource Graph?
  2. Are there plans for the catalog to include the environment (Copilot Studio) and project (Foundry), with filtering on them? Is there a timeline?
  3. Which IDs are supported for linking a catalog package to its source agent (for example agentIdentityId, manifestId)?
  4. Is app-only access to Resource Graph PowerPlatformResources with the AI Reader role supported, and when will the inventory become GA?

Happy to share our test results or join a short call.

Thanks,
Ashok

Microsoft Copilot | Microsoft 365 Copilot | Development
0 comments No comments

2 answers

Sort by: Most helpful
  1. Ashlesha Pawar (Tata Consultancy Services Limited) 730 Reputation points Microsoft External Staff
    2026-12-01T05:15:14.55+00:00

    Hi @Ashok Reddy Kommasani

    Adding to the points above, I would recommend using a combination of data sources rather than relying solely on the Agent 365 catalog.

    • Copilot Studio: Use Azure Resource Graph to discover agents and retrieve environment-related metadata, while checking which fields are generally available versus preview.
    • Microsoft Foundry: Use Azure Resource Graph for project discovery and the Foundry Agents API to retrieve individual agents.
    • Agent 365 catalog: Use it primarily for deployment and governance information rather than complete environment or project inventory.
    • Agent identification: Prefer documented Entra agent identity IDs for correlation, and validate the mapping before using it in production.
    • App-only authentication: Verify the authentication and permission requirements separately for each API, as support for application permissions varies.

    Regarding catalog enhancements and GA timelines, these would need confirmation from the Microsoft product team, as public documentation does not establish a committed release timeline.

    This combined approach should provide a more reliable and maintainable tenant-wide inventory.

    Hope this helps!

    Was this answer helpful?

    0 comments No comments

  2. Eber Daniel Perez 245 Reputation points
    2026-11-30T15:48:02.56+00:00

    Hi Ashok,

    I've built this kind of inventory for customers, so here's what I'd use today. Short version: there's no single GA source that covers both platforms with environment/project context, so I combine two sources and join them on the Entra agent identity.

    1. Which source

    • Copilot Studio agents: Power Platform inventory, through Azure Resource Graph. PowerPlatformResources, type microsoft.copilotstudio/agents. One query for the whole tenant, with environmentId and the identity fields, and no application user per environment. The schema page marks each field as GA or Preview, so build your contract on the GA ones (environmentId, entraAgentId, entraAppId, entraAgentBlueprintId are GA).
    • Foundry: ARM for projects, project endpoint for agents. Projects are regular ARM resources, so they come from the resources table in ARG (not from PowerPlatformResources; the Power Platform inventory schema only covers Power Platform resource types). The agents inside each project come from GET {project endpoint}/agents?api-version=v1 (token scope https://ai.azure.com/.default, max 100 per page, paginate with after). Your app needs a Foundry role on each project for that call.
    • Agent 365 catalog: I'd use it as the "what's deployed, to whom, is it blocked" layer (availableTo, deployedTo, isBlocked, governanceMetadata), not as the source of environment/project. It needs an Agent 365 license and CopilotPackages.Read.All (application is supported). $filter only works on supportedHosts, elementTypes, lastModifiedDateTime, platform, requestStatus and requestType.
    • Dataverse: only if you need details from the agent definition itself. The app user per environment is the price.
    PowerPlatformResources
    | where type == "microsoft.copilotstudio/agents"
    | extend p = parse_json(properties)
    | project agentId = name, agentName = tostring(p.displayName),
              environmentId = tostring(p.environmentId),
              entraAgentId = tostring(p.entraAgentId),
              entraAppId = tostring(p.entraAppId)
    
    resources
    | where type =~ "microsoft.cognitiveservices/accounts/projects"
    | project id, name, resourceGroup, subscriptionId, location
    

    3. IDs to link a catalog package to its source agent

    • Package agentIdentityId is documented as the Entra agent identity of the package. On the Copilot Studio side, properties.entraAgentId is the Entra Agent ID. On the Foundry side, every agent gets its own agent identity, and its object ID shows up as agentIdentityId in the agent resource JSON. That's the join I'd use. Test it on a few agents first, because no page says "join these two fields" in so many words.
    • Older Copilot Studio agents may only have entraAppId (legacy). Match that against the package appId (Entra app registration ID). Agent Builder agents have none of these fields.
    • manifestId is documented only as the ID declared in the package manifest. I didn't find docs that map it to a Copilot Studio bot ID or a Foundry agent ID, so I wouldn't use it as a join key.

    4. App-only and AI Reader

    • Inventory access needs one of these Entra roles: Global admin, Power Platform admin, Dynamics 365 admin, Global reader, AI administrator or AI reader. AI reader sees agents, agentic apps, agent flows, environments and environment groups. Built-in Power Platform RBAC roles don't work here.
    • The Power Platform inventory API explicitly doesn't support app-only (service principal or managed identity gets 403). For ARG PowerPlatformResources with a service principal, I couldn't find docs that say it's supported or not. So I'd treat it as not supported until Microsoft confirms. If you test it and it works, keep a delegated fallback.

    2 and the GA date: there's no public timeline on Learn for environment/project fields in the catalog or for inventory GA. Only the product team can answer that. Leave feedback on the inventory and catalog doc pages and ask your Microsoft account team.

    Docs:

    Hope this helps!

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.