Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 1Discover the latest updates and new features to Dynamics 365 planned April 2021 through September 2021.
Release overview guides and videos Release Plan | Preview 2021 Release Wave 1 Timeline
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I have been using the XRM Tooling assembly for integration applications for some time.
Our company is currently on CRM 2016 but we have built a brand new Dynamics 365 instance and are ready to make the transition.
We have "AD integrated with O365" so use our domain credentials to login to Dynamics 365.
I have been testing a command line app and have found that the Connection String method from XRM Tooling works fine when the type is set to AD and I supply the Dynamics URL.
However, if I try to supply an AD Account directly using any combination of username, password and domain, I cannot connect.
Is this broken?
I have been advised by someone who had a similar issue that the workaround is to create a dedicated O365 account and use that. However this has a licencing cost and we already have a service account in place that I would rather use.
Are you using CrmServiceClient or different approach to connect to CRM? Could you please share the connection code?
Apologies, I should have said that yet I am using "CrmServiceClient".
This works: "Url=mycrm.crm11.dynamics.com; AuthType=AD;"
This does not work: "Url=mycrm.crm11.dynamics.com; AuthType=AD; Domain=mydomain; Username=username; Password=password;"
Since your AD synced to O365, the it should authenticate with 365 method, could you try the following code and see if this works for you
CrmServiceClient SourceCRM = new CrmServiceClient(
"username", CrmServiceClient.MakeSecureString("password"), "", "Org Unique ID - you can get it from Settings -> Customization -> Developer Resources page", useUniqueInstance: true, useSsl: true, isOffice365: true);
Make sure you use the latest CRM SDK DLLs. If you are connecting from Console App you may have to add the following line before you actually connect
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
Aha, that does work. So it is the case that the Connection String does not work in this instance.
I usually put that in the App.Config as one value. I guess with the version above, I need to split out the username, password etc as separate settings.
You could still use the connection string, have you tried the following with the above code
<!-- Online using Office 365 -->
<!-- <add name="ConnStringName"
connectionString="Url=contoso.crm.dynamics.com; Usernamefirstname.lastname@example.org; Password=password; authtype=Office365"/> -->
Thank you for all the answers. There is the alternative method above and the connection string which is an answer.
My issue was moving from AD to Office365, I discovered that we has a second set of O365 logins on our domain which I had not expected. We have "@domain.com" but also "servicedomain.com". It was only when I looked more closely at the User in CRM did I spot the difference.
I can confirm that, in my situation AD/O365 integration is now working with the standard connection string.
I'm having issues connecting to CRM from a webservice. It was fine a couple of days ago.
My conn string is
string conn = "AuthType=Office365;Url=https://************.api.crm4.dynamics.com/XRMServices/2011/Organization.svc;Username=stuart@****.com;Password=***";
A console app fails too
static void Main(string args)
string conn = "AuthType=Office365;Url=****.api.crm4.dynamics.com/.../Organization.svc;Username=stuart@****.com;Password=***"; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
CrmServiceClient crmServiceClient = new CrmServiceClient(conn);
Console.WriteLine("\nPlease make sure the Connection String is correct.");
catch (Exception ex)
throw new Exception(ex.Message);
Update Nuget to latest stable assemblies. MS removed some old code from inside the Tooling assembly.
That should fix it.
You may find that XrmToolbox is now broken, if you use it. Same reason. Update and use Ms login control rather than connection wizard.
Hope that helps.
Always possible you have another issue but the change happened a couple of days ago.
Business Applications communities