# How do I configure a Dataverse plug-in to access an Azure resource with managed identity v2?

Exam: AB-400 — Power Platform Developer Associate
Knowledge domain: Extend Microsoft Power Platform (35–40%)
Updated: 2026-11-25T06:47:21.722802+00:00
HTML: https://learningpathx.com/faq/AB-400/ab400-dataverse-plugin-managed-identity-v2.html

## Also asked as

- What trust and permissions does a Dataverse plug-in need to use Power Platform managed identity v2?
- How do I set up and verify outbound Azure access from a Dataverse plug-in using version 2 identity?

Configure Power Platform managed identity version 2 for the signed plug-in assembly or package, grant the workload principal the minimum access needed on the Azure resource, and request a token for that resource using `IManagedIdentityService.AcquireToken`. The Dataverse caller's permission to execute the operation remains a separate check. [Set up Power Platform managed identity v2](https://learn.microsoft.com/en-us/power-platform/admin/set-up-managed-identity) · [Dataverse custom API privileges](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/custom-api)

1. In a development environment, provision a Microsoft Entra app registration or user-assigned managed identity, then sign and register the plug-in. Use a trusted-issuer certificate for production. Microsoft limits self-signed certificates to development or testing.
2. Configure the federated credential for the correct environment and cloud. For a trusted-issuer certificate, version 2 uses SHA-256 Base64URL hashes of the exact full runtime `X509Certificate2.Issuer` and `Subject` strings. Use the cloud-specific issuer, audience and subject format.
3. Create the Dataverse identity record with `version=2`, `credentialsource=2`, `subjectscope=1`, and the matching application and tenant IDs. Associate it with the registered assembly or package and grant access at the resource.
4. Verify token acquisition and a real, permitted resource operation independently. For `AADSTS700213`, compare the configured subject, environment, certificate and cloud settings. If token acquisition succeeds but the resource rejects the call, check the requested resource scope and its access policy. [Microsoft's setup and validation procedure](https://learn.microsoft.com/en-us/power-platform/admin/set-up-managed-identity)

Record the environment mapping and owner of certificate renewal. Validate a deliberately denied operation with the deployed workload identity before relying on the configuration.

Source: [AB-400: Custom APIs, Business Events and Plug-in Identity](https://learningpathx.com/news/ab-400-custom-apis-business-events-and-plug-in-identity.html)
