Have registered the trial version of Dynamics 365 (2016) & Installed the NuGet package through powershell using below url
https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/download-tools-nuget
Verified the User, has admin rights also verified the Plugin Registration Tool version, it is 9.0.0.9154 64bit version
Service authentication in Dynamics 365 - crm8.dynamics.com, able to run the Organization & Discovery service in the system.
When tried to login, getting below error. Can you please help resolve the issue.
Source : Microsoft.IdentityModel.Clients.ActiveDirectory
Method : CreateFromUnauthorizedResponseCommon
Date : 1/22/2018
Time : 3:50:52 PM
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.Xrm.Tooling.Connector.CrmWebSvc.GetAuthorityFromTargetService(Uri targetServiceUrl)
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)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.DiscoverOrganizations(Uri discoveryServiceUri, ClientCredentials clientCredentials, X509Certificate2 loginCertificate, UserIdentifier user, String clientId, Uri redirectUri, PromptBehavior promptBehavior, String tokenCachePath, Boolean isOnPrem, String authority, CrmLogEntry logSink)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.DiscoverOrganizations(Uri discoveryServiceUri, ClientCredentials clientCredentials, UserIdentifier user, String clientId, Uri redirectUri, PromptBehavior promptBehavior, String tokenCachePath, Boolean isOnPrem, String authority, CrmLogEntry logSink)
at Microsoft.Xrm.Tooling.CrmConnectControl.CrmConnectionManager.QueryOAuthDiscoveryServer(Uri discoServer, ClientCredentials liveCreds, UserIdentifier user, String clientId, Uri redirectUri, PromptBehavior promptBehavior, String tokenCachePath)
at Microsoft.Xrm.Tooling.CrmConnectControl.CrmConnectionManager.FindCrmOnlineDiscoveryServer(ClientCredentials liveCreds)
at Microsoft.Xrm.Tooling.CrmConnectControl.CrmConnectionManager.ValidateServerConnection(CrmOrgByServer selectedOrg)