Dynamics 365 for CE (CRM) v9 Package Deployer won't connect to org

1.1k views Asked by At

I already have the answer but wanted to post this for others to find.

I was having this issue when I downloaded the FS/PSA demo data from FS and PSA Demo Data and tried to run PD against CRM v9 orgs. Of the 5 sandboxes in one of my tenants, it was failing to connect to 3 of those. All were v9 and had FS/PSA locaded. The first symptom of the problem is that PD would accept my login info, let me pick one of my orgs, and then take me back to the login page. Upon checking the log file at %appdata%\Microsoft\Microsoft Dynamics® CRM Package Deployer\3.0.0.848\PackageDeployer_[token]-[date].log, I saw the error: "Unauthorized Http Status Code (401) was expected in the response".

Here is the full error in the log file:

Microsoft.Xrm.Tooling.Connector.CrmServiceClient    Information 8   12/19/2017 10:54:48 AM  ConnectAndInitCrmOrgService - Requesting connection to Organization with CRM Version: 9.0.0.3172
Microsoft.Xrm.Tooling.Connector.CrmServiceClient    Error   2   12/19/2017 10:54:48 AM  ERROR REQUESTING Token FROM THE Authentication context
Microsoft.Xrm.Tooling.Connector.CrmServiceClient    Error   2   12/19/2017 10:54:48 AM  Source  : Microsoft.IdentityModel.Clients.ActiveDirectory
Method  : CreateFromUnauthorizedResponseCommon
Date    : 12/19/2017
Time    : 10:54:48 AM
Error   : Unauthorized Http Status Code (401) was expected in the response
Parameter name: response
Stack Trace : at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationParameters.CreateFromUnauthorizedResponseCommon(IHttpWebResponse response)
   at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationParameters.CreateFromUnauthorizedResponse(HttpWebResponse response)
   at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.GetAuthorityFromTargetService(Uri targetServiceUrl) in c:\bt\362589\r\de3ae9\src\DynamicsCrmToolbox\Utilities\Microsoft.Uii.AddOn.DynamicsCRM.Connector\CRMWebSvc.cs:line 1815
   at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.ExecuteAuthenticateServiceProcess(Uri serviceUrl, ClientCredentials clientCredentials, X509Certificate2 userCert, UserIdentifier user, String clientId, Uri redirectUri, PromptBehavior promptBehavior, String tokenCachePath, Boolean isOnPrem, String authority, Uri& targetServiceUrl, AuthenticationContext& authContext, String& resource, CrmLogEntry logSink) in c:\bt\362589\r\de3ae9\src\DynamicsCrmToolbox\Utilities\Microsoft.Uii.AddOn.DynamicsCRM.Connector\CRMWebSvc.cs:line 1703
1

There are 1 answers

0
Frank Wilson On BEST ANSWER

The fix for this is to add the following 2 entries to your registry:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\v4.0.30319] "SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft.NETFramework\v4.0.30319] "SchUseStrongCrypto"=dword:00000001

Then just restart PD (no system reboot needed). hth!