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

Community site session details

Session Id :
Customer Service forum

Error to get all instances Dynamics 365 Online with PowerShell

(0) ShareShare
ReportReport
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:
I have the same question (0)
  • Suggested answer
    Kayapo Profile Picture
    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.

  • Lars Raue Profile Picture
    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.

  • Kayapo Profile Picture
    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.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

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 > Customer Service

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans