How To retrieve the list of organizations using C#

Open your solution in VS , right-click the name of the project that you want to add the service to, and then click Add Service Reference.

The Add Service Reference dialog box appears


add service reference

click Discover.

All WCF services in the current solution are added to the Service list.

In the Service list, expand the node for the service that you want to use and select a service contract.

In the Namespace box, enter the namespace that you want to use for the reference

Click OK to add the reference to the project.

A service client (proxy) is generated, and metadata describing the service is added to the app.config file

Then add the following references assemblies

  1. Microsoft.crm.sdk.proxy
  2. Microsoft.Xrm.Sdk
  3. System.ServiceModel




and this is the result


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s