# Which user does a Dataverse plug-in's Organization service run as?

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

## Also asked as

- Which identity does CreateOrganizationService use inside a Dataverse plug-in?
- How does a Dataverse plug-in step's Run in User's Context setting affect its SDK calls?

Inside a Dataverse plug-in, get `IOrganizationServiceFactory` from the supplied `IServiceProvider` and call `CreateOrganizationService(context.UserId)` to use the effective identity defined by the step registration. The default step setting is Calling User. If a designer sets Run in User's Context to a different user, operations made through that service run with the selected user's Dataverse privileges. [Impersonate a user in a Dataverse plug-in](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/impersonate-a-user)

Use `context.InitiatingUserId` deliberately when the operation should use the user who originally initiated the chain. That identity can differ from the step's effective user. Keep the service and execution context in local variables because Dataverse can reuse plug-in instances. Plug-ins use the SDK Organization service supplied by the platform. Web API calls back into Dataverse from plug-in code are unsupported. [Write a Dataverse plug-in](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/write-plug-in)

Verify the step with a restricted intended caller. For example, run one permitted related-row read and one intentionally denied write. If the rule can use a registered image, it may need neither call. Treat elevated execution as an explicit trust decision and include it in the registration review. [Register a plug-in](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/register-plug-in)

Source: [AB-400: Dataverse Plug-ins and the Event Execution Pipeline](https://learningpathx.com/news/ab-400-dataverse-plug-ins-and-the-event-execution-pipeline.html)
