Study FAQ
When should a Dataverse client use delegated OAuth access or an application user?
Also asked as 2
- Which OAuth identity should a Dataverse client use for interactive versus unattended access?
- How do I choose between acting for a signed-in user and using application access in Dataverse?
Answer
Use delegated access when the Dataverse operation should run under a signed-in user's authority. Use application access for an unattended workload whose own identity should have explicitly assigned Dataverse rights. Both patterns use Microsoft Entra ID. A .NET or Python API choice alone leaves that authority decision open. OAuth authentication for Dataverse
For an independent public client that signs in a user, configure Dataverse delegated permission and use the target environment's /user_impersonation scope as documented. Keep application secrets and private keys out of a public client. For confidential, application-only requests, use the target environment's /.default scope and map the Entra principal to an application user with suitable roles in that Dataverse environment. Hosted model-driven app JavaScript normally uses the application-provided client surface and its active session. Dataverse OAuth scenarios · Application users and environment roles
Verify who is acting before testing business access. A user-facing action that must honor an operator's own permissions needs an acceptance test under that operator. A scheduled integration needs a separate test under the workload principal. Compare an allowed operation and one outside the intended grants for each pattern.
Full explanation
AB-400: Dataverse API Clients and OAuth Authentication
Study guide · AB-400
Read the full explanation