Share via


CrmServiceClient.DiscoverOrganizations Method

Definition

Overloads

DiscoverOrganizations(Uri, Uri, NetworkCredential)

Discovers the organizations.

DiscoverOrganizations(Uri, Uri, ClientCredentials, ClientCredentials)

Discovers the organizations.

DiscoverOrganizations(Uri, ClientCredentials, UserIdentifier, String, Uri, String, Boolean, String, PromptBehavior, Boolean)

Discovers the organizations, used for OAuth.

DiscoverOrganizations(Uri, Uri, NetworkCredential)

Discovers the organizations.

public:
 static Microsoft::Xrm::Sdk::Discovery::OrganizationDetailCollection ^ DiscoverOrganizations(Uri ^ discoveryServiceUri, Uri ^ homeRealmUri, System::Net::NetworkCredential ^ networkCredential);
public static Microsoft.Xrm.Sdk.Discovery.OrganizationDetailCollection DiscoverOrganizations (Uri discoveryServiceUri, Uri homeRealmUri, System.Net.NetworkCredential networkCredential);
static member DiscoverOrganizations : Uri * Uri * System.Net.NetworkCredential -> Microsoft.Xrm.Sdk.Discovery.OrganizationDetailCollection
Public Shared Function DiscoverOrganizations (discoveryServiceUri As Uri, homeRealmUri As Uri, networkCredential As NetworkCredential) As OrganizationDetailCollection

Parameters

discoveryServiceUri
Uri

The discovery service URI.

homeRealmUri
Uri

The home realm URI. Not null for federation authentication.

networkCredential
NetworkCredential

The network credential. When given null value, uses the current user network credentials.

Returns

A collection of organizations.

Applies to

DiscoverOrganizations(Uri, Uri, ClientCredentials, ClientCredentials)

Discovers the organizations.

public:
 static Microsoft::Xrm::Sdk::Discovery::OrganizationDetailCollection ^ DiscoverOrganizations(Uri ^ discoveryServiceUri, Uri ^ homeRealmUri, System::ServiceModel::Description::ClientCredentials ^ clientCredentials, System::ServiceModel::Description::ClientCredentials ^ deviceCredentials);
public static Microsoft.Xrm.Sdk.Discovery.OrganizationDetailCollection DiscoverOrganizations (Uri discoveryServiceUri, Uri homeRealmUri, System.ServiceModel.Description.ClientCredentials clientCredentials, System.ServiceModel.Description.ClientCredentials deviceCredentials);
static member DiscoverOrganizations : Uri * Uri * System.ServiceModel.Description.ClientCredentials * System.ServiceModel.Description.ClientCredentials -> Microsoft.Xrm.Sdk.Discovery.OrganizationDetailCollection
Public Shared Function DiscoverOrganizations (discoveryServiceUri As Uri, homeRealmUri As Uri, clientCredentials As ClientCredentials, deviceCredentials As ClientCredentials) As OrganizationDetailCollection

Parameters

discoveryServiceUri
Uri

The discovery service URI.

homeRealmUri
Uri

The home realm URI. Not null for federation authentication.

clientCredentials
ClientCredentials

The client credentials.

deviceCredentials
ClientCredentials

The device credentials.

Returns

A collection of organizations.

Applies to

DiscoverOrganizations(Uri, ClientCredentials, UserIdentifier, String, Uri, String, Boolean, String, PromptBehavior, Boolean)

Discovers the organizations, used for OAuth.

public static Microsoft.Xrm.Sdk.Discovery.OrganizationDetailCollection DiscoverOrganizations (Uri discoveryServiceUri, System.ServiceModel.Description.ClientCredentials clientCredentials, Microsoft.IdentityModel.Clients.ActiveDirectory.UserIdentifier user, string clientId, Uri redirectUri, string tokenCachePath, bool isOnPrem, string authority, Microsoft.IdentityModel.Clients.ActiveDirectory.PromptBehavior promptBehavior = Microsoft.IdentityModel.Clients.ActiveDirectory.PromptBehavior.Auto, bool useDefaultCreds = false);
static member DiscoverOrganizations : Uri * System.ServiceModel.Description.ClientCredentials * Microsoft.IdentityModel.Clients.ActiveDirectory.UserIdentifier * string * Uri * string * bool * string * Microsoft.IdentityModel.Clients.ActiveDirectory.PromptBehavior * bool -> Microsoft.Xrm.Sdk.Discovery.OrganizationDetailCollection
Public Shared Function DiscoverOrganizations (discoveryServiceUri As Uri, clientCredentials As ClientCredentials, user As UserIdentifier, clientId As String, redirectUri As Uri, tokenCachePath As String, isOnPrem As Boolean, authority As String, Optional promptBehavior As PromptBehavior = Microsoft.IdentityModel.Clients.ActiveDirectory.PromptBehavior.Auto, Optional useDefaultCreds As Boolean = false) As OrganizationDetailCollection

Parameters

discoveryServiceUri
Uri

The discovery service URI.

clientCredentials
ClientCredentials

The client credentials.

user
Microsoft.IdentityModel.Clients.ActiveDirectory.UserIdentifier

The user identifier.

clientId
String

The client Id.

redirectUri
Uri

The redirect uri.

tokenCachePath
String

The token cache path where token cache file is placed.

isOnPrem
Boolean

The deployment type: OnPrem or Online.

authority
String

The authority provider for OAuth tokens. Unique if any already known.

promptBehavior
Microsoft.IdentityModel.Clients.ActiveDirectory.PromptBehavior

The prompt behavior.

useDefaultCreds
Boolean

(Optional) if specified, tries to use the current user

Returns

A collection of organizations

Applies to