< Back

Connect-CrmOnline

Sat Jan 18, 2020 3:58 pm

NAME Connect-CrmOnline



SYNOPSIS

Connects to CRM Online organization without using Discovery Service.





SYNTAX

Connect-CrmOnline [-Credential] <PSCredential> [-ServerUrl] <String> [[-ForceDiscovery] <SwitchParameter>]

[[-ForceOAuth] <SwitchParameter>] [[-OAuthClientId] <String>] [[-OAuthRedirectUri] <String>] [<CommonParameters>]





DESCRIPTION

The Connect-CrmOnline cmdlet lets you connect to CRM Online organization without using Discovery Service.

You can use Get-Credential to create Credential information.





PARAMETERS

-Credential <PSCredential>

A PS-Credential. You can invoke Get-Credential.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ServerUrl <String>

A Url of your Dynamics CRM Online organization.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ForceDiscovery [<SwitchParameter>]

Forces the connector to verify an org connection with discovery (NOT COMPATIBLE with Partner CSP).



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ForceOAuth [<SwitchParameter>]

Forces oAuth authentication via Azure Active Directory. The default auth type is Office365.



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-OAuthClientId <String>

Azure Active Directory Native Application Id



Required? false

Position? 5

Default value

Accept pipeline input? false

Accept wildcard characters? false



-OAuthRedirectUri <String>





Required? false

Position? 6

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS









OUTPUTS









NOTES









-------------------------- Example 1 --------------------------



PS C:\\> Connect-CrmOnline -Credential (Get-Credential) -ServerUrl "https://contoso.crm.dynamics.com"



Connect to online using your organization URL







IsReady : True

IsBatchOperationsAvailable : True

Authority :

OAuthUserId :

ActiveAuthenticationType : Office365

OrganizationServiceProxy : Microsoft.Xrm.Tooling.Connector.CrmWebSvc+ManagedTokenOrganizationServiceProxy

OrganizationWebProxyClient :

LastCrmError : OrganizationWebProxyClient is null

LastCrmException :

CrmConnectOrgUriActual : https://contoso.api.crm.dynamics.com/XR ... zation.svc

ConnectedOrgFriendlyName : contoso

ConnectedOrgUniqueName : contoso

ConnectedOrgPublishedEndpoints : {[WebApplication, https://contoso.crm.dynamics.com/], [OrganizationService,

https://contoso.api.crm.dynamics.com/XR ... zation.svc],

[OrganizationDataService,

https://contoso.api.crm.dynamics.com/XR ... onData.svc]}

ConnectionLockObject : System.Object

ConnectedOrgVersion : 8.2.1.359

DisableCrossThreadSafeties : False

CallerId : 00000000-0000-0000-0000-000000000000



-------------------------- Example 2 --------------------------



PS C:\\> Connect-CrmOnline -ServerUrl "https://contoso.crm.dynamics.com" -ForceOAuth



Connect to online using your organization URL using oAuth and get prompted for a credential (versus providing one)







IsReady : True

IsBatchOperationsAvailable : True

Authority : https://login.windows.net/99f9884f-8651 ... authorize/

OAuthUserId : user@contoso.com

ActiveAuthenticationType : OAuth

OrganizationServiceProxy :

OrganizationWebProxyClient : Microsoft.Xrm.Sdk.WebServiceClient.OrganizationWebProxyClient

LastCrmError :

LastCrmException :

CrmConnectOrgUriActual :

https://contoso.api.crm.dynamics.com/XR ... 9.0.9002.0

ConnectedOrgFriendlyName : Contoso

ConnectedOrgUniqueName : contosocrmol

ConnectedOrgPublishedEndpoints : {[WebApplication, https://contoso.crm.dynamics.com/], [OrganizationService,

https://contoso.api.crm.dynamics.com/XR ... zation.svc], [OrganizationDataService,

https://contoso.api.crm.dynamics.com/XR ... onData.svc]}

ConnectionLockObject : System.Object

ConnectedOrgVersion : 8.2.1.359

DisableCrossThreadSafeties : False

CallerId : 00000000-0000-0000-0000-000000000000





RELATED LINKS