MscrmTools / XrmToolBox

An application that gather multiple tools to ease the customization and configuration of Microsoft Dynamics CRM/365/Dataverse/PowerApps
https://www.xrmtoolbox.com
GNU General Public License v3.0
573 stars 216 forks source link

Connect to crm 2016 online #299

Closed cedar-technologies closed 8 years ago

cedar-technologies commented 8 years ago

Does v1.2015.12.20 offers the possibility to connect to crm 2016 online using O365 account?

Thanks

MscrmTools commented 8 years ago

Yes, if you put your CRM online org url, you should have to specify your login and password, then it should connect The only scenario I wasn't able to test is if your office 365 is federated with your local AD

MscrmTools commented 8 years ago

I just tested it now

image

cedar-technologies commented 8 years ago

No my office 365 is not, I'm going to give it a try again (sorry really new to the tool)

MscrmTools commented 8 years ago

No problem, just copy your browser url when connected to your organization and paste it in the connection wizard url

cedar-technologies commented 8 years ago

I was able to connect with a previous version (1.2015.11.5) but not with the latest one, should I pass this url : https://xxxxxx.crm.dynamics.com then my O365 Credentials?

MscrmTools commented 8 years ago

Yes

cedar-technologies commented 8 years ago

I can connect with 1.2015.11.5 but for some reason not with 12.20, is crm 2016 supported with 11.5?

MscrmTools commented 8 years ago

No, normally, you should not be able to connect to CRM 2016 with 11.5

MscrmTools commented 8 years ago

I don't know if you overwrote your Xrmtoolbox folder with the latest version but if so, please try with a fresh copy

MscrmTools commented 8 years ago

Ok, there is definitively a problem here... I cannot succeeded either to connect to a CRM 2016 online. My previous test was a CRM 2015 Online (my mistake). Anyway, I tried with PluginRegistrationTool from CRM 2016 SDK and there is the same problem, I cannot connect so it looks like a problem with SDK assemblies. I'm trying to reach Microsoft to get some help on this topic.

cedar-technologies commented 8 years ago

Thanks, let me know if you find out a solution :-) Alex

MscrmTools commented 8 years ago

It was not working yesterday, it is working today without any change...

Can you test again today?

cedar-technologies commented 8 years ago

Hi,

no it's still not running

ValoremXrm commented 8 years ago

Hey MscrmTools, long time user. Thank you for your work on this. I just downloaded Christmas release and it will not connect. I lost older version when computer crashed or I would just use that and move on. I am accessing O365 2015 7.1.1. No rush, enjoy your holidays.

MscrmTools commented 8 years ago

This is a known issue where the connection works only if use ssl parameter is set to false, even with office 365!!! A work around is on the way, just need to commit it

mscottsewell commented 8 years ago

I am also unable to connect to a 2015 O365 instance using the latest 2015.12.20 release - (The November version still works fine.)
I'm reading your comment but I don't see a place to set the SSL Parameter to False, is that something I can do to test? or do I need to wait for your commit?

MscrmTools commented 8 years ago

Unfortunately, I need to release a new version for that...

MscrmTools commented 8 years ago

Can you test latest pre release version?

mscottsewell commented 8 years ago

I tried the 2016.104.72 release. When it attempted to connect, it threw "Object reference not set to an instance of an object" - are there any logs/messages that I could provide that would be helpful? image

This is connecting to CRM Online (2015) - (It uses our ADFS server for authentication.)

MscrmTools commented 8 years ago

@rappen is on the same situation... and I guess my changes should work but this new error message seems related to my code... Just to be sure, can you add this xml in the xrmtoolbox.exe.config file?

<system.diagnostics>
    <trace autoflush="true" />
    <sources>
      <source name="Microsoft.Xrm.Tooling.Connector.CrmServiceClient"
              switchName="Microsoft.Xrm.Tooling.Connector.CrmServiceClient"
              switchType="System.Diagnostics.SourceSwitch">
        <listeners>
          <add name="console" type="System.Diagnostics.DefaultTraceListener" />
          <remove name="Default" />
          <add name ="fileListener" />
        </listeners>
      </source>

      <source name="Microsoft.Xrm.Tooling.CrmConnectControl"
              switchName="Microsoft.Xrm.Tooling.CrmConnectControl"
              switchType="System.Diagnostics.SourceSwitch">
        <listeners>
          <add name="console" type="System.Diagnostics.DefaultTraceListener" />
          <remove name="Default" />
          <add name ="fileListener" />
        </listeners>
      </source>
    </sources>
    <switches>
      <!--
            Possible values for switches: Off, Error, Warning, Info, Verbose
                Verbose:    includes Error, Warning, Info, Trace levels
                Info:       includes Error, Warning, Info levels
                Warning:    includes Error, Warning levels
                Error:      includes Error level
        -->
      <add name="Microsoft.Xrm.Tooling.Connector.CrmServiceClient" value="Verbose" />
      <add name="Microsoft.Xrm.Tooling.CrmConnectControl" value="Verbose" />
      <add name="Microsoft.Xrm.Tooling.WebResourceUtility" value="Verbose" />
    </switches>
    <sharedListeners>
      <add name="fileListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="XRMToolingLogs.log" />
      <!--<add name="eventLogListener" type="System.Diagnostics.EventLogTraceListener" initializeData="XRMTooling" />-->
    </sharedListeners>
  </system.diagnostics>

It should write some logs in the XrmToolBox folder when trying to connect

rappen commented 8 years ago

Just to confirm - I get the same Object reference.... error using latest prerelease.

MscrmTools commented 8 years ago

Hum... I thought I just added another extra connection with the SSL parameter set to false...

It must be something else...

mscottsewell commented 8 years ago

@MscrmTools - Were you asking me to add the XML (above) to new file in my directory? I created a file, but now the toolbox doesn't start. "side-by-side configuration is incorrect" If that's not what you were asking me to do - just disregard. ;)

MscrmTools commented 8 years ago

The complete file should looks like this:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.diagnostics>
    <trace autoflush="true" />
    <sources>
      <source name="Microsoft.Xrm.Tooling.Connector.CrmServiceClient"
              switchName="Microsoft.Xrm.Tooling.Connector.CrmServiceClient"
              switchType="System.Diagnostics.SourceSwitch">
        <listeners>
          <add name="console" type="System.Diagnostics.DefaultTraceListener" />
          <remove name="Default" />
          <add name ="fileListener" />
        </listeners>
      </source>

      <source name="Microsoft.Xrm.Tooling.CrmConnectControl"
              switchName="Microsoft.Xrm.Tooling.CrmConnectControl"
              switchType="System.Diagnostics.SourceSwitch">
        <listeners>
          <add name="console" type="System.Diagnostics.DefaultTraceListener" />
          <remove name="Default" />
          <add name ="fileListener" />
        </listeners>
      </source>
    </sources>
    <switches>
      <!--
            Possible values for switches: Off, Error, Warning, Info, Verbose
                Verbose:    includes Error, Warning, Info, Trace levels
                Info:       includes Error, Warning, Info levels
                Warning:    includes Error, Warning levels
                Error:      includes Error level
        -->
      <add name="Microsoft.Xrm.Tooling.Connector.CrmServiceClient" value="Verbose" />
      <add name="Microsoft.Xrm.Tooling.CrmConnectControl" value="Verbose" />
      <add name="Microsoft.Xrm.Tooling.WebResourceUtility" value="Verbose" />
    </switches>
    <sharedListeners>
      <add name="fileListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="XRMToolingLogs.log" />
      <!--<add name="eventLogListener" type="System.Diagnostics.EventLogTraceListener" initializeData="XRMTooling" />-->
    </sharedListeners>
  </system.diagnostics>
</configuration>
mscottsewell commented 8 years ago

OK - it looks like it's connecting to the service and it finds the 9 orgs in our O365 organization - but when it attempts to connect to my production org 'XX' - it fails.

Microsoft.Xrm.Tooling.Connector.CrmServiceClient Information: 8 : DiscoverOrganizations - Discovery Server Get Orgs Call Complete - Elapsed:00:00:02.4671943
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Information: 8 : Found 9 Org(s)
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Information: 8 : looking for Org = XX in the results from CRM's Discovery server list.
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Unable to Login to Dynamics CRM

I'm happy to send the complete log to you directly.

MscrmTools commented 8 years ago

Yes, please! And send me the url you are using too Thanks

mscottsewell commented 8 years ago

@MscrmTools Done. - sent to your gmail account.

MscrmTools commented 8 years ago

Ok, for information, the problem seems related to the fact that the organization uses AAD. In this configuration the constructor for class CrmServiceClient expects the organization unique name instead of the organization url name I tested the same in an organization (also 7.1.1) without AAD and it works fine with organization url name

I'm waiting for feedback from Microsoft

rappen commented 8 years ago

Workaround until MS got this figured out, that at least work to connect Online 7.1.1.4314 over O365: Replace organization friendly name with it's unique name found under Settings - Customizations - Developer Resources:

Red smudge indicates friendly name, green smudge is unique name. image

image

ValoremXrm commented 8 years ago

Thank you Jonas, this works great!

forceworks commented 8 years ago

Yes, this worked for me also, thanks

KittyDreadful commented 8 years ago

I still can't get this work. I'm on 8.0.0.286 (CRM 16). This is killing me! Any help? Any idea when it will be fixed? :/

MscrmTools commented 8 years ago

@kittyDreadful is your Office 365 tenant federated with your local AD?

KittyDreadful commented 8 years ago

No, its not.

joenewstrom commented 8 years ago

I have AAD and had to use the following combination:

  1. Enter the URL Unique Name as @rappen indicated.
  2. Do not check "Use your current credentials" (this threw an error)
  3. Do not check "Store passwords as encrypted string in connections file" (this threw an error and is bad password hygiene anyway)
  4. Connect and type in your password. (Works)

Little bit of getting used to vs. the old XRM Toolbox but it works fine once you're in.

Golsaa commented 8 years ago

I'm trying to use v1.2016.1.30 for CRM 2016 online but it doesn't connect to CRM yet. Any suggestion? xrmtoolboxcannotconnectcrm

thanks

rappen commented 8 years ago

Incorrect error message "Object reference not set..." should be resolved by PR #332. Try prerelease from Feb 3. or later where this is included. At lease you should get a more informative message then...

Skubakoob commented 8 years ago

Getting same error - the pre release just gives me an unable to login to crm message I've tried the unique name, no joy with that. Any way to get more information about what it's actually complaining about?

daryllabar commented 8 years ago

You have to hand edit the connection xml. Just changing it in the UI won't work due to another bug.

soliver99 commented 8 years ago

how do you "hand edit the connection xml"?

daryllabar commented 8 years ago

@soliver99, open up the xml file in Notepad ++

bsampath84 commented 8 years ago

@daryllabar I am also seeing the same error. I have hand-edited the xml and seeing the same issue. the version i am using is 1.2016.1.30. My organization also uses 2 factor authentication. Is that also a factor for not working? Please let me know.

daryllabar commented 8 years ago

@MscrmTools My understanding is that 2 factor authentication isn't enabled for the XTB. Is that correct?

MscrmTools commented 8 years ago

You are right, two factors is not supported yet

daryllabar commented 8 years ago

@bsampath84 , there is your answer.

bsampath84 commented 8 years ago

@daryllabar thank you for the quick response.. Could you please let me know if you know Abby other tool that can work with two factor? I mean I am trying to use fetchxml builder on our crm online 2015 instance

daryllabar commented 8 years ago

Sorry. can't help there. You could stand up a demo environment, import you solution into that, and then build your fetch XML in that.

McSockMonkey commented 8 years ago

I had this problem as well. It was resolved for me by opening the toolbox, going to the Settings, then the Proxy tab and changing the setting to "Use Internet Explorer configured proxy". So for some, this or the Custom Proxy may be a solution.

rodarius commented 8 years ago

Is it the plan to use the 2Factor authentication with the application password or are you going to implement the actual 2Factor logon with actively retreiving the 2nd factor ?

MscrmTools commented 8 years ago

I won't implement anything myself but let XRM.Tooling assemblies from Microsoft do the job. But, as stated in #337, it will take time since I don't have yet a deployment with 2F authentication available