Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

IOrganizationServiceFactory.CreateOrganizationService Method

Definition

Namespace:
Microsoft.Xrm.Sdk
Assembly:
Microsoft.Xrm.Sdk.dll
Package:
Microsoft.PowerPlatform.Dataverse.Client v1.2.10

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Returns an IOrganizationService instance for the organization that the specified user is a member of.

public:
 Microsoft::Xrm::Sdk::IOrganizationService ^ CreateOrganizationService(Nullable<Guid> userId);
public Microsoft.Xrm.Sdk.IOrganizationService CreateOrganizationService(Guid? userId);
abstract member CreateOrganizationService : Nullable<Guid> -> Microsoft.Xrm.Sdk.IOrganizationService
Public Function CreateOrganizationService (userId As Nullable(Of Guid)) As IOrganizationService

Parameters

userId
Nullable<Guid>

Specifies the system user that calls to the service are made for.

When called in a plug-in, a null value indicates the SYSTEM user and a Guid.Empty value indicates the same user as IPluginExecutionContext. UserId. Any other value indicates a specific system user.

When called in a custom workflow activity, all service calls are made in the IWorkflowExecutionContext.UserId context.

Returns

An organization service factory object.

Applies to