Study guide
7.5 Authenticating to Power Platform with Managed Identities
Microsoft Power Platform Developer Associate PL-400
Track your progress as you read
Finished sections get a check mark.
1 Introduction, Exam Overview & Developer Toolchain
0.1 PL-400 Exam Facts 0.2 Audience Profile & Required Developer Skills 0.3 The Power Platform Developer Toolchain 0.4 Extension-Point Map & AI in the Developer Workflow
2 Create a Technical Design
1.1 Analyzing Technical Architecture and Choosing Out-of-the-Box vs. Custom Solutions 1.2 Designing Authentication, Authorization, and Security Architecture 1.3 Deciding Where Business Logic Runs and Choosing the Right Table Type 1.4 Designing Reusable Power Apps Components and Custom Connectors 1.5 Designing Dataverse Code Components, Automations, and Integrations
3 Build Power Platform Solutions
2.1 Managing Power Platform Environments for Development 2.2 Dataverse Security Roles for Code Components, Least Privilege & Troubleshooting Operational Security 2.3 Solutions, Managing Dependencies & Solution Layers 2.4 Environment Variables & Connection References 2.5 Power Platform Pipelines & CI/CD with Power Platform Build Tools
4 Implement Power Apps Improvements
3.1 Complex Power Fx Formulas and Functions 3.2 Building Reusable Canvas Component Libraries 3.3 Invoking Power Automate Cloud Flows from a Canvas App 3.4 Troubleshooting Canvas and Model-Driven Apps with Monitor and Browser Debugging Tools 3.5 Optimizing Canvas and Model-Driven App Performance
5 Extend the User Experience
4.1 The Client API Object Model & JavaScript Form Scripting 4.2 Event Handler Registration & Navigation to Custom Pages via the Client API 4.3 Client Scripting Against the Dataverse Web API; Command Bar & Buttons with Power Fx and JavaScript 4.4 PCF Fundamentals: The Component Manifest & Lifecycle Events 4.5 Implementing PCF Component Interfaces; Device, Utility & Web API Features 4.6 Packaging, Deploying & Consuming a PCF Component
6 Extend the Platform: Dataverse Plug-ins & Custom APIs
5.1 Plug-in Fundamentals & the Event Execution Pipeline Stages 5.2 Execution Context & Implementing Business Logic in Plug-ins 5.3 Pre/Post Images & Organization Service Operations in Plug-ins 5.4 Registering Plug-ins with the Plug-in Registration Tool & Optimizing Plug-in Performance 5.5 Custom API Messages & Plug-ins That Implement a Custom API 5.6 Configuring Dataverse Business Events
7 Extend the Platform: Custom Connectors
6.1 Open API Definitions: Building and Extending a Custom Connector 6.2 Authentication and Policy Templates for Custom Connectors 6.3 Importing Definitions and Creating Connectors for Azure Services 6.4 Azure Functions in Custom Connectors and Data Transformation
8 Extend the Platform: Platform APIs & Azure Functions
7.1 Dataverse Web API Operations & OAuth Authentication 7.2 Organization Service Operations, Concurrency, Transactions & Bulk Operations 7.3 Service Protection API Limits & Retry Policies 7.4 Azure Functions for Long-Running, Scheduled & Event-Driven Workloads 7.5 Authenticating to Power Platform with Managed Identities
9 Extend the Platform: Power Automate Cloud Flows
8.1 Dataverse connector triggers/actions, trigger filters & retry policies 8.2 Complex expressions & flow control with error handling 8.3 Sensitive input/output parameters & Azure Key Vault 8.4 Reusable child flows & Microsoft Entra ID service principals
10 Develop Integrations
9.1 Publishing Dataverse Events: IServiceEndpointNotificationService & the Plug-in Registration Tool 9.2 Registering Service Endpoints: Webhooks, Azure Service Bus & Event Hub 9.3 Data Synchronization with Change Tracking & Alternate Keys 9.4 Upsert-Based Synchronization with the UpsertRequest Message
11 Exam Readiness & Practice
10.1 Cross-Domain "Where Do I Implement This?" Decision Framework 10.2 Exam-Day Strategy, PL-400 Item Styles & Study Plan
7.5 Authenticating to Power Platform with Managed Identities
Key Takeaways Explain This Topic AI
A managed identity is an Entra ID identity Azure creates and manages automatically for a resource such as an Azure Function, eliminating stored client secrets or certificates.
System-assigned identities are tied 1:1 to one resource's lifecycle; user-assigned identities are standalone and can be shared across multiple resources.
The identity still needs an Application User created in the Power Platform admin center using its object ID, plus an assigned security role — Azure-side setup alone grants no Dataverse access.
Code acquires a token via ManagedIdentityCredential or DefaultAzureCredential instead of a client-credentials request built from a stored secret.
Benefits driving exam scenarios: no secret to rotate or leak, no expiry-driven outages, and a reduced attack surface, while still respecting least-privilege security roles.
Last updated: July 2026
Any Azure resource that calls Dataverse — most commonly an Azure Function — needs a credential to authenticate through OAuth 2.0. The traditional approach, a client secret or certificate stored in application settings, works but creates an ongoing maintenance and security burden: secrets expire, must be rotated, and can leak if mishandled. Managed identities solve this by letting Azure itself manage the credential.
What a Managed Identity Is
A managed identity is an identity in Microsoft Entra ID that Azure automatically creates and manages for a specific Azure resource — an Azure Function App, a Logic App, a VM, and others. There are two flavors:
System-assigned managed identity — tied 1:1 to a single Azure resource's lifecycle; created when enabled on that resource and deleted automatically when the resource is deleted.
User-assigned managed identity — created as a standalone Azure resource in its own right, which can then be attached to one or more other resources (for example, several Azure Functions sharing the same identity).
In both cases, Azure handles the underlying credential and its rotation entirely behind the scenes — no client secret or certificate ever appears in the Function's code or application settings.
Wiring a Managed Identity Up to Dataverse
Enabling a managed identity on the Azure side is only half the setup. Dataverse has no automatic trust relationship with an arbitrary Entra ID identity — it must be explicitly granted access, exactly like any other application:
Enable the managed identity on the Azure Function App (system-assigned, or attach a user-assigned identity), which generates an object ID for that identity in Entra ID.
Create an Application User for that identity in the Power Platform admin center, using the managed identity's object ID (rather than a traditional app registration's client ID) as the identifying value.
Assign a security role to that Application User following the principle of least privilege — the same as with any other app-only integration — so the identity can only perform the operations the workload actually needs.
In the Function's code, acquire a token using a credential type built for managed identities (such as ManagedIdentityCredential or the broader DefaultAzureCredential in the Azure Identity library) targeting the Dataverse resource, instead of building a client-credentials request with a stored secret.
Once configured, the Function calls the Web API or Organization service exactly as any other app-only caller would — the only difference is where the credential came from.
Why This Matters for PL-400 Scenarios
Managed identities are the recommended authentication approach whenever the calling workload runs entirely inside Azure and doesn't need a portable credential (for example, a case where the same secret must also be used outside Azure, which would rule out a managed identity). The benefits that make this the preferred pattern on the exam:
No secret to store, rotate, or accidentally leak in source control, application settings, or Key Vault.
No expiry-driven outages — traditional client secrets and certificates expire and, if not rotated in time, cause authentication failures; Azure manages a managed identity's credential lifecycle automatically.
Reduced attack surface — there is no exportable secret value for an attacker to exfiltrate from configuration.
Consistent least-privilege model — a managed identity still goes through the same Application User + security role assignment as any other app-only integration, so it doesn't bypass Dataverse's authorization model, only its credential-management burden.
A scenario describing "an Azure Function that authenticates to Dataverse without managing secrets" or "eliminating credential rotation for a service-to-service integration" is pointing directly at a managed identity, paired with the corresponding Application User configuration in the target environment — omitting that admin-center step is the most common way this pattern fails in practice, since Azure-side setup alone grants no Dataverse permissions.
DefaultAzureCredential and the Fallback Chain
In .NET code, the Azure Identity library's DefaultAzureCredential is the pattern Microsoft recommends for code that needs to work seamlessly across local development and production. It tries a sequence of credential sources in order — environment variables, a signed-in Visual Studio or Azure CLI session during local development, and finally the managed identity when running inside Azure — and uses whichever one succeeds first. This means the same code can authenticate with a developer's local Azure CLI login while debugging, and automatically pick up the deployed Function App's managed identity in production, with no code branching required: var credential = new DefaultAzureCredential();
- var token = await credential.GetTokenAsync(
- new TokenRequestContext(new[] { "https://orgname.crm.dynamics.com/.default" }));
- Managed Identity vs. Traditional App Registration
Aspect Traditional app registration + secret Managed identity
Credential storage Client secret or certificate stored in config/Key Vault No credential stored — Azure manages it internally
Rotation Manual (or a separate automation) before expiry Automatic, handled by Azure
Portability Works from anywhere with the secret Only usable by the specific Azure resource(s) it is assigned to
Dataverse setup Application User keyed on the app registration's client ID Application User keyed on the managed identity's object ID
Best fit Integrations that must run outside Azure, or need a portable credential Integrations that run entirely on Azure compute, such as an Azure Function calling Dataverse
This trade-off is exactly why managed identities are not universal: an on-premises service or a workload hosted outside Azure has no managed identity to use and must fall back to a traditional app registration with a secret or certificate — the exam expects developers to recognize both when each pattern is the right fit and when it is architecturally impossible to use.