OrganizationServiceProxy OrganizationServiceProxy OrganizationServiceProxy OrganizationServiceProxy Class

Definition

Implements IOrganizationService and provides an authenticated WCF channel to the organization service.

public ref class OrganizationServiceProxy : Microsoft::Xrm::Sdk::Client::ServiceProxy<Microsoft::Xrm::Sdk::IOrganizationService ^>, Microsoft::Xrm::Sdk::IOrganizationService
public class OrganizationServiceProxy : Microsoft.Xrm.Sdk.Client.ServiceProxy<Microsoft.Xrm.Sdk.IOrganizationService>, Microsoft.Xrm.Sdk.IOrganizationService
type OrganizationServiceProxy = class
    inherit ServiceProxy<IOrganizationService>
    interface IOrganizationService
Public Class OrganizationServiceProxy
Inherits ServiceProxy(Of IOrganizationService)
Implements IOrganizationService
Inheritance
OrganizationServiceProxyOrganizationServiceProxyOrganizationServiceProxyOrganizationServiceProxy
Implements

Remarks

To call the Microsoft Dynamics 365 web service using the IOrganizationService interface, cast the proxy instance to an IOrganizationService type.

This class is not thread safe. Microsoft Dynamics 365 (online) authentication using the Microsoft Online Services environment identity provider, including Microsoft Office 365, is supported.

Constructors

OrganizationServiceProxy(IServiceConfiguration<IOrganizationService>, ClientCredentials) OrganizationServiceProxy(IServiceConfiguration<IOrganizationService>, ClientCredentials) OrganizationServiceProxy(IServiceConfiguration<IOrganizationService>, ClientCredentials) OrganizationServiceProxy(IServiceConfiguration<IOrganizationService>, ClientCredentials)

Initializes a new instance of the OrganizationServiceProxy class using a service configuration and client credentials.

OrganizationServiceProxy(IServiceConfiguration<IOrganizationService>, SecurityTokenResponse) OrganizationServiceProxy(IServiceConfiguration<IOrganizationService>, SecurityTokenResponse) OrganizationServiceProxy(IServiceConfiguration<IOrganizationService>, SecurityTokenResponse) OrganizationServiceProxy(IServiceConfiguration<IOrganizationService>, SecurityTokenResponse)

Initializes a new instance of the OrganizationServiceProxy class using a service configuration and a security token response.

OrganizationServiceProxy(IServiceManagement<IOrganizationService>, ClientCredentials) OrganizationServiceProxy(IServiceManagement<IOrganizationService>, ClientCredentials) OrganizationServiceProxy(IServiceManagement<IOrganizationService>, ClientCredentials) OrganizationServiceProxy(IServiceManagement<IOrganizationService>, ClientCredentials)

Initializes a new instance of the OrganizationServiceProxy class using a service configuration and client credentials.

OrganizationServiceProxy(IServiceManagement<IOrganizationService>, SecurityTokenResponse) OrganizationServiceProxy(IServiceManagement<IOrganizationService>, SecurityTokenResponse) OrganizationServiceProxy(IServiceManagement<IOrganizationService>, SecurityTokenResponse) OrganizationServiceProxy(IServiceManagement<IOrganizationService>, SecurityTokenResponse)

Initializes a new instance of the OrganizationServiceProxy class using a service management and a security token response.

OrganizationServiceProxy(Uri, Uri, ClientCredentials, ClientCredentials) OrganizationServiceProxy(Uri, Uri, ClientCredentials, ClientCredentials) OrganizationServiceProxy(Uri, Uri, ClientCredentials, ClientCredentials) OrganizationServiceProxy(Uri, Uri, ClientCredentials, ClientCredentials)

Initializes a new instance of the OrganizationServiceProxy class using a organization service URI, home realm URI, and client and device credentials.

Properties

CallerId CallerId CallerId CallerId

Gets or sets the ID of the user for whom SDK calls are made on behalf of.

CallerRegardingObjectId CallerRegardingObjectId CallerRegardingObjectId CallerRegardingObjectId

ChannelFactory ChannelFactory ChannelFactory ChannelFactory

Gets a WCF channel factory that manages a single channel instance.

(Inherited from ServiceProxy<TService>)
ClientCredentials ClientCredentials ClientCredentials ClientCredentials

Gets the login credentials of the client.

(Inherited from ServiceProxy<TService>)
DeviceCredentials DeviceCredentials DeviceCredentials DeviceCredentials

Gets the Windows Live credentials of a registered device.

(Inherited from ServiceProxy<TService>)
EndpointAutoSwitchEnabled EndpointAutoSwitchEnabled EndpointAutoSwitchEnabled EndpointAutoSwitchEnabled

Gets or sets a value that enables automatic switching from the organization’s current endpoint to an alternate endpoint.

(Inherited from ServiceProxy<TService>)
EndpointSwitch EndpointSwitch EndpointSwitch EndpointSwitch

Gets the endpoint switch information from the web service configuration.

(Inherited from ServiceProxy<TService>)
HomeRealmSecurityTokenResponse HomeRealmSecurityTokenResponse HomeRealmSecurityTokenResponse HomeRealmSecurityTokenResponse

Gets the security token response of the home realm.

(Inherited from ServiceProxy<TService>)
HomeRealmUri HomeRealmUri HomeRealmUri HomeRealmUri

Gets the home realm URI.

(Inherited from ServiceProxy<TService>)
IsAuthenticated IsAuthenticated IsAuthenticated IsAuthenticated

Gets a value indicating if the WCF channel has been authenticated.

(Inherited from ServiceProxy<TService>)
SdkClientVersion SdkClientVersion SdkClientVersion SdkClientVersion

Gets or sets the version of the client.

SecurityTokenResponse SecurityTokenResponse SecurityTokenResponse SecurityTokenResponse

Gets the security token response.

(Inherited from ServiceProxy<TService>)
ServiceChannel ServiceChannel ServiceChannel ServiceChannel

Gets the communication channel used to access a Microsoft Dynamics 365 service.

(Inherited from ServiceProxy<TService>)
ServiceConfiguration ServiceConfiguration ServiceConfiguration ServiceConfiguration

Gets a service configuration.

(Inherited from ServiceProxy<TService>)
ServiceManagement ServiceManagement ServiceManagement ServiceManagement

Gets a service management.

(Inherited from ServiceProxy<TService>)
SyncOperationType SyncOperationType SyncOperationType SyncOperationType

No token name is specified <token xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"> <?Comment AL: Marked as internal per bug114678 2013-09-17T18:04:00Z Id='8?>internal<?CommentEnd Id='8' ?></token>.

Timeout Timeout Timeout Timeout

Gets or sets the maximum amount of time a single channel operation has to complete before a timeout fault is raised on a service channel binding.

(Inherited from ServiceProxy<TService>)
UserPrincipalName UserPrincipalName UserPrincipalName UserPrincipalName

Gets or sets the UPN that is an Internet-style login name for a user based on the Internet standard RFC 822.

(Inherited from ServiceProxy<TService>)
UserType UserType UserType UserType

Methods

Associate(String, Guid, Relationship, EntityReferenceCollection) Associate(String, Guid, Relationship, EntityReferenceCollection) Associate(String, Guid, Relationship, EntityReferenceCollection) Associate(String, Guid, Relationship, EntityReferenceCollection)

Creates a link between records.

AssociateCore(String, Guid, Relationship, EntityReferenceCollection) AssociateCore(String, Guid, Relationship, EntityReferenceCollection) AssociateCore(String, Guid, Relationship, EntityReferenceCollection) AssociateCore(String, Guid, Relationship, EntityReferenceCollection)

For internal use only.

Authenticate() Authenticate() Authenticate() Authenticate()

Closes the service channel and channel factory if they are open, and then invokes AuthenticateCore().

(Inherited from ServiceProxy<TService>)
AuthenticateCore() AuthenticateCore() AuthenticateCore() AuthenticateCore()

Authenticates the client with a service.

(Inherited from ServiceProxy<TService>)
AuthenticateCrossRealm() AuthenticateCrossRealm() AuthenticateCrossRealm() AuthenticateCrossRealm()

Invokes AuthenticateCrossRealmCore().

(Inherited from ServiceProxy<TService>)
AuthenticateCrossRealmCore() AuthenticateCrossRealmCore() AuthenticateCrossRealmCore() AuthenticateCrossRealmCore()

Authenticates a user in a realm other than the realm that the Microsoft Dynamics 365 server is located in.

(Inherited from ServiceProxy<TService>)
AuthenticateDevice() AuthenticateDevice() AuthenticateDevice() AuthenticateDevice()

Invokes AuthenticateDeviceCore().

(Inherited from ServiceProxy<TService>)
AuthenticateDeviceCore() AuthenticateDeviceCore() AuthenticateDeviceCore() AuthenticateDeviceCore()

Authenticates a device with Windows Live.

(Inherited from ServiceProxy<TService>)
CloseChannel(Boolean) CloseChannel(Boolean) CloseChannel(Boolean) CloseChannel(Boolean)

Closes a validated service channel.

(Inherited from ServiceProxy<TService>)
Create(Entity) Create(Entity) Create(Entity) Create(Entity)

Creates a record.

CreateCore(Entity) CreateCore(Entity) CreateCore(Entity) CreateCore(Entity)

For internal use only.

Delete(String, Guid) Delete(String, Guid) Delete(String, Guid) Delete(String, Guid)

Deletes a record.

DeleteCore(String, Guid) DeleteCore(String, Guid) DeleteCore(String, Guid) DeleteCore(String, Guid)

For internal use only.

Disassociate(String, Guid, Relationship, EntityReferenceCollection) Disassociate(String, Guid, Relationship, EntityReferenceCollection) Disassociate(String, Guid, Relationship, EntityReferenceCollection) Disassociate(String, Guid, Relationship, EntityReferenceCollection)

Deletes a link between records.

DisassociateCore(String, Guid, Relationship, EntityReferenceCollection) DisassociateCore(String, Guid, Relationship, EntityReferenceCollection) DisassociateCore(String, Guid, Relationship, EntityReferenceCollection) DisassociateCore(String, Guid, Relationship, EntityReferenceCollection)

For internal use only.

Dispose() Dispose() Dispose() Dispose()

Custom implementation of Dispose that disposes the service channel and channel factory.

(Inherited from ServiceProxy<TService>)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Custom implementation of Dispose that disposes the service channel and channel factory.

(Inherited from ServiceProxy<TService>)
EnableProxyTypes() EnableProxyTypes() EnableProxyTypes() EnableProxyTypes()

Enables support for the early-bound entity types.

EnableProxyTypes(Assembly) EnableProxyTypes(Assembly) EnableProxyTypes(Assembly) EnableProxyTypes(Assembly)

Enables support for the early-bound entity types exposed in a specified assembly.

Execute(OrganizationRequest) Execute(OrganizationRequest) Execute(OrganizationRequest) Execute(OrganizationRequest)

Executes a message in the form of a request, and returns a response.

ExecuteCore(OrganizationRequest) ExecuteCore(OrganizationRequest) ExecuteCore(OrganizationRequest) ExecuteCore(OrganizationRequest)

For internal use only.

HandleFailover(BaseServiceFault, Nullable<Boolean>) HandleFailover(BaseServiceFault, Nullable<Boolean>) HandleFailover(BaseServiceFault, Nullable<Boolean>) HandleFailover(BaseServiceFault, Nullable<Boolean>)

For internal use only.

(Inherited from ServiceProxy<TService>)
HandleFailover(Nullable<Boolean>) HandleFailover(Nullable<Boolean>) HandleFailover(Nullable<Boolean>) HandleFailover(Nullable<Boolean>)

For internal use only.

(Inherited from ServiceProxy<TService>)
OnFactoryClosed(ChannelEventArgs) OnFactoryClosed(ChannelEventArgs) OnFactoryClosed(ChannelEventArgs) OnFactoryClosed(ChannelEventArgs)

Event handler virtual method for a channel factory that is in a closed state.

(Inherited from ServiceProxy<TService>)
OnFactoryFaulted(ChannelFaultedEventArgs) OnFactoryFaulted(ChannelFaultedEventArgs) OnFactoryFaulted(ChannelFaultedEventArgs) OnFactoryFaulted(ChannelFaultedEventArgs)

Event handler virtual method for a channel factory that is in a faulted state.

(Inherited from ServiceProxy<TService>)
OnFactoryOpened(ChannelEventArgs) OnFactoryOpened(ChannelEventArgs) OnFactoryOpened(ChannelEventArgs) OnFactoryOpened(ChannelEventArgs)

Event handler virtual method for a channel factory that is in an opened state.

(Inherited from ServiceProxy<TService>)
Retrieve(String, Guid, ColumnSet) Retrieve(String, Guid, ColumnSet) Retrieve(String, Guid, ColumnSet) Retrieve(String, Guid, ColumnSet)

Retrieves a record.

RetrieveCore(String, Guid, ColumnSet) RetrieveCore(String, Guid, ColumnSet) RetrieveCore(String, Guid, ColumnSet) RetrieveCore(String, Guid, ColumnSet)

For internal use only.

RetrieveMultiple(QueryBase) RetrieveMultiple(QueryBase) RetrieveMultiple(QueryBase) RetrieveMultiple(QueryBase)

Retrieves a collection of records.

RetrieveMultipleCore(QueryBase) RetrieveMultipleCore(QueryBase) RetrieveMultipleCore(QueryBase) RetrieveMultipleCore(QueryBase)

For internal use only.

ShouldRetry(MessageSecurityException, Nullable<Boolean>) ShouldRetry(MessageSecurityException, Nullable<Boolean>) ShouldRetry(MessageSecurityException, Nullable<Boolean>) ShouldRetry(MessageSecurityException, Nullable<Boolean>)

Checks a message security exception to determine if a service call should be attempted again.

(Inherited from ServiceProxy<TService>)
SwitchToAlternateEndpoint() SwitchToAlternateEndpoint() SwitchToAlternateEndpoint() SwitchToAlternateEndpoint()

Switches the organization’s current endpoint to an alternate endpoint, if one is available.

(Inherited from ServiceProxy<TService>)
Update(Entity) Update(Entity) Update(Entity) Update(Entity)

Updates an existing record.

UpdateCore(Entity) UpdateCore(Entity) UpdateCore(Entity) UpdateCore(Entity)

For internal use only.

ValidateAuthentication() ValidateAuthentication() ValidateAuthentication() ValidateAuthentication()

Authenticates the client and creates a new service channel.

(Inherited from ServiceProxy<TService>)

Events

EndpointSwitched EndpointSwitched EndpointSwitched EndpointSwitched

Occurs when a failover recovery has completed and the organization’s current endpoint has been switched to an alternate endpoint.

(Inherited from ServiceProxy<TService>)
EndpointSwitchRequired EndpointSwitchRequired EndpointSwitchRequired EndpointSwitchRequired

Occurs when a failover has occurred and a switch from the organization’s current endpoint to an alternate endpoint is required.

(Inherited from ServiceProxy<TService>)
FactoryClosed FactoryClosed FactoryClosed FactoryClosed

Occurs when a channel factory is closed.

(Inherited from ServiceProxy<TService>)
FactoryFaulted FactoryFaulted FactoryFaulted FactoryFaulted

Occurs when a channel factory is faulted.

(Inherited from ServiceProxy<TService>)
FactoryOpened FactoryOpened FactoryOpened FactoryOpened

Occurs when a channel factory is opened.

(Inherited from ServiceProxy<TService>)

Applies to