Skip to main content

Notifications

Customer Service forum

Error to get all instances Dynamics 365 Online with PowerShell

Posted on by 5

Hi all,

Trying to get all instances for Dynamics 365 Online, this was working fine until last Sunday. Since Monday we get the following error:

$CRMOrg = Get-CrmOrganizations -Credential $cred -OnLineType Office365
WARNING: Failed to connect to CRM: BadConnect
WARNING: Failed to connect to CRM: Exception while trying to connect Discovery Server, (Global Discovery) URI is = globaldisco.crm.dynamics.com/.../InstancesNo Orgs Found, Searched Online. Region Setting =
Get-CrmOrganizations : Failed to connect to CRM: Exception while trying to connect Discovery Server, (Global Discovery) URI is = globaldisco.crm.dynamics.com/.../InstancesNo Orgs Found, Searched Online. Region Setting =
En línea: 3 Carácter: 11
+ $CRMOrg = Get-CrmOrganizations -Credential $cred -OnLineType Office36 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (:) [Get-CrmOrganizations], Exception
+ FullyQualifiedErrorId : -3,Microsoft.Xrm.Tooling.CrmConnector.Powershell.Commands.GetOrganizations

Anyone knows something related with this error?

Appreciate the comments.

Thanks in advance

Categories:
  • Kayapo Profile Picture
    Kayapo 5 on at
    RE: Error to get all instances Dynamics 365 Online with PowerShell

    Hello, Lars Raue

    I was managed to solve this issue when i used TLS 1.2 if you have the same problem, you will need to put this at the top of your scripts

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

    Regards.

  • Lars Raue Profile Picture
    Lars Raue 5 on at
    RE: Error to get all instances Dynamics 365 Online with PowerShell

    Today i get the same error. How did you solve that problem? Please advise.

  • Suggested answer
    Kayapo Profile Picture
    Kayapo 5 on at
    RE: Error to get all instances Dynamics 365 Online with PowerShell

    Hi..

    The error message was solved. I've had to forced the use of TLS 1.2 at the beginning of the script session: [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

    Hugs.

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

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,802 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,129 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,154

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans