Documentation / Integrations / Microsoft Copilot Studio
Microsoft Copilot Studio connector
Connect an Entra ID app registration to pull Copilot Credit consumption per agent from the Power Platform licensing API (entitlement MCSMessages). Credits are valued at your org rates and stored alongside other API sources.
Status: In development · Claim C-27
Overview
Connect an Entra ID app registration to pull Copilot Credit consumption per agent from the Power Platform licensing API (entitlement MCSMessages). Credits are valued at your org rates and stored alongside other API sources.
Data pulled
- Daily per-agent credit consumption (resourceId × environmentId)
- Billed vs non-billable credits when metadata exposes them
- Valued cost_usd using org PAYG / prepaid pack rates (basis labeled on each row)
- Agents registered in inventory via external_refs.copilot_studio_resource_id
- Persisted as source_type=api_sync
Authentication & credential storage
Meridian stores the following fields for this connector (values encrypted at rest):
tenant_idclient_idclient_secret
- Credentials are encrypted with AES-256-GCM using a KMS-wrapped data encryption key (DEK) and stored in vendor_connections.credentials_encrypted.
- Meridian never returns the plaintext key after save. Revocation is disconnect: deactivate or delete the vendor connection — sync stops and the encrypted blob is no longer used.
- OAuth client-credentials against https://api.powerplatform.com/.default (read-only licensing). Consent typically requires Power Platform Administrator or Global Administrator.
- Prefer app permissions Licensing.Allocations.Read and Licensing.BillingPolicies.Read — Meridian never allocates capacity.
Sync schedule & behavior
Microsoft capacity data can lag the admin center by hours. Syncs automatically every 6 hours; manual sync anytime. There is no per-connection frequency setting.
Setup steps
- Register an Entra app; grant Power Platform API access with licensing read permissions.
- Admin-consent the app for your tenant (Power Platform Admin or Global Admin).
- Confirm a PAYG billing policy (or prepaid packs) is linked for environments that host agents.
- Connect Microsoft Copilot Studio in Meridian Vendors with tenant id, client id, and client secret.
- Optional: set org rates at PUT /api/meridian/vendors/copilot-studio/rates (defaults match published PAYG $0.01 and pack $0.008).
- After sync, confirm spend_records and agents inventory for discovered Studio bots.
- Manual fallback (Zero-Access): export consumption from Power Platform admin center → Licensing → Copilot Studio and use bill/invoice import.
Troubleshooting
- 401/403: verify admin consent and licensing read scopes; token audience must be api.powerplatform.com.
- Empty consumption: confirm agents generated traffic and the environment has a billing policy; try a single-day window.
- Double-count risk: if Azure OpenAI is also connected, review source_meter_reconciliation_items — do not sum PAYG credit $ with the matching Azure invoice line.