web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Get-CrmConnection doesn't work in Powershell for Dynamic 365 Online 9.0 Version !!!

(0) ShareShare
ReportReport
Posted on by

Hi guys,

I am trying to get connection in powershell "Get-CrmConnection" for Dynamic 365 Online Instance (Version 9.0) but unfortunately without any success. I've tried SDK version 8.2 for  old instance  (8.2 Version), which works fine. Any suggestion or do you experience the same ? Thanks for help in advance. 

*This post is locked for comments

I have the same question (0)
  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Are you using the SDK v9 assembly files?

    Can you please share any errors that you are getting that can help troubleshoot the issue...

    Thanks.

  • Community Member Profile Picture
    on at

    Hi Aric,

    Here is the message what I am getting.

    cmdlet Get-Credential at command pipeline position 1

    Supply values for the following parameters:

    Microsoft.Xrm.Tooling.CrmConnector.PowerShell\Get-CrmConnection : More then one org was returned, retry with an exact org name

    At line:3 char:11

    + $crmOrg = Microsoft.Xrm.Tooling.CrmConnector.PowerShell\Get-CrmConnec ...

    +           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

       + CategoryInfo          : InvalidData: (:) [Get-CrmConnection], Exception

       + FullyQualifiedErrorId : -2,Microsoft.Xrm.Tooling.CrmConnector.Powershell.Commands.GetCrmConnectionCommand

    IsReady                        : False

     

     

    I've also tried to use InteractiveMode but it's just list all organization and redirect to login page seems to be hanging out. But I can log in to Dynamic 365 instance without July Update (8.2.x.x). Thank you for any suggestions in advance. Mike 

  • Suggested answer
    Community Member Profile Picture
    on at

    Please use this code

    [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12

    $conn = Get-CrmConnection  -OrganizationName $organizationName -DeploymentRegion CAN –OnlineType Office365  -Credential $Cred  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans