An error occured while retrieving organizations.

Sep 10, 2014 at 2:32 AM
Hi,

I'm trying to connect to CRM Online.

I get the following error:
An error occurred while retrieving organizations: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.

I've tried with the following settings:
  1. Use Office 365
  2. Server Name = crm.dynamics.com
  3. Custom Authentication
  4. Domain = UserName@Company.onmicrosoft.com
  5. Password = the user password
I've also tried with only selecting user CRM Online.

Thanks,
katrina
Sep 10, 2014 at 4:00 PM
Hi
I have the same problem
The followinfg error is different: An error occurred while retrieving organizations: The format of the chain initialization does not conform to specification starting at index xx

Thanks
Christophe
Sep 16, 2014 at 9:44 AM
Hello.

I am getting exactly the same problem:

[tick} Use CRM Online
Under Authentication:
Enter login ID and password, click on "get orgs" and get error message:

An error occurred while retrieving organizations: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.

Any ideas?

regards

hostis
Coordinator
Sep 17, 2014 at 2:17 PM
One idea might be the computer time that could be not synchronized with Internet time so certificate cannot be validated

Another idea, do you select the right CRM online tenant?
Oct 26, 2014 at 9:25 PM
I'm not sure why 'use CRM online' doesn't work. The good news is that I got it to work when I specified 'use office 365'.
Jan 30, 2015 at 9:24 AM
When I click on the Get Orgs button, I'm getting the error ...

"An error occurred while retrieving organizations: clientCredentials.UserName.UserName or clientCredentials.Windows.ClientCredential.UserName MUST be populated"

The Use CRM Online and Use Office 365 both ticked

Double checked and I have the right server name for our online instance
Coordinator
Jan 30, 2015 at 9:30 AM
Could you provide a screenshot of the connection form?
Jan 30, 2015 at 11:24 AM
Edited Jan 30, 2015 at 11:25 AM
Hopefully shared through OneDrive ...

connection error

alternative

I first had to add a XrmToolBox.exe.config file with ...
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.net>
    <defaultProxy useDefaultCredentials="true" >
      <proxy usesystemdefault="True" />
    </defaultProxy>
  </system.net>
</configuration>
Coordinator
Jan 30, 2015 at 12:00 PM
Ok, your username has to be an email address as your are trying to connect to CRM Online
Jan 30, 2015 at 12:18 PM
Thanks

Some progress ...

Now getting "An error occured [sic] while retrieving organizations: Access is denied"
But I've tried two different accounts :-(

And one of them I've successfully used in the SDK AuthenticateWithNoHelp sample

Cheers,
SteveC.
Coordinator
Jan 30, 2015 at 12:23 PM
I don't know what the problem is

If you want more help, send me a private message with your credentials so that I can debug live
Jan 30, 2015 at 2:19 PM
Not sure what changed ... I did log in to our dev instance of Online

Anyway, the organisation list now populates fine, and I've connected Ok

Thanks for the help
Feb 25, 2015 at 3:56 PM
Edited Feb 25, 2015 at 3:57 PM
I am seeing similar error today, connecting to a 2015 CRMOL instance when clicking "Get Orgs." button:

An error occurred while retrieving organization: Metadata contains a reference that cannot be resolved: 'https://disco.crm.dynamics.com:80/XRMServices/2011/Discovery.svc?wsdl'. Inner Exception: The operation has timed out.

I've tried changing the timeout value on the connection form to 00:05:00 but same error occurs (after only 2 minutes, as it turns out).

Use SSL, Use CRM Online, Use Office 365
Server Name: crm.dynamics.com
Custom Authentication
Coordinator
Feb 25, 2015 at 5:50 PM
Chris,
I don't know why but there is a port 80 added in the url... It could be a bug

Or try to force port 443 on connection form
Feb 25, 2015 at 6:23 PM

Made that change, but saw another bug:

When you click “Use SSL”, it prefills the port number field with 433 instead of 443 J

Fixing that, I went on to supply custom login information, but received the same error.

Server Name: crm.dynamics.com

Port Number: 443

Domain: I didn’t want to put anything in here, but the form required I put something, so I just used a space. I also tried “onmicrosoft.com”, “crm.dyanmics.com”, and “.”. None of which seemed to work.

User Name & Password was the same as before

I also suspect that the Timeout Value that you can enter on the form is not actually being used by the code.

I’m cloning the source now, and will see if I can submit a pull request later.

Cheers!

Chris

Coordinator
Feb 25, 2015 at 6:27 PM
You shouldn't have to provide domain name when using CRM online... So don't fill anything here
Feb 25, 2015 at 6:33 PM

Yes, but without the Use CRM Online checkbox checked, the form requires something to be in the Domain field.

I’ve got a fix for the UI capturing the URL that seems to work. Need to do some additional spot testing, but should submit a pull request soon.

Thanks!

Chris

Feb 25, 2015 at 6:52 PM

Ok – just submitted a pull request for the change I made. LMK if you have any questions.

Cheers!

Chris

Coordinator
Feb 25, 2015 at 7:53 PM
I'm currently working on an update for all connection part so I will include directly a fix for this problem in my code.

So, don't be made if I refuse the pull request.

More over, the change you made is not totally exact. We can UseSsl and specify a port different from 443.

I don't if you can cancel a pull request on Github? I'm still a newbie here
Mar 2, 2015 at 3:38 AM
Is there a fix or a workaround for the issue that Chris was facing with connecting to CRM Online? I am having the same issue and would appreciate some help please.
Coordinator
Mar 2, 2015 at 5:44 AM
The only workaround would be to add a CRM online connection directly in the file mscrmtools2011.config

I will try to push a new version this week with the fix included