web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

PluginRegistration Tool - The remote server returned an error: (401) Unauthorized

(0) ShareShare
ReportReport
Posted on by 17

Hello,

I am using Plugin registration  tool to register plugin in CRM online but  I' m not able to login.

The username and password is correct 100% sure.  Please help.

Please find the part of the  log file:

Source : mscorlib
Method : HandleReturnMessage
Date : 3/05/2017
Time : 1:46:49 PM
Error : The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Bearer error=access_denied, error_description=Authentication fail. Ticket id 78976a5a-ac7a-4906-8757-af414f665e7c, authorization_uri=login.windows.net/.../authorize, resource_id=disco.crm5.dynamics.com'.
Stack Trace : Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest request, HttpWebResponse response, WebException responseException, HttpChannelFactory`1 factory)
at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory`1 factory, WebException responseException, ChannelBinding channelBinding)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Xrm.Sdk.Discovery.IDiscoveryService.Execute(DiscoveryRequest request)
at Microsoft.Xrm.Sdk.WebServiceClient.WebProxyClient`1.ExecuteAction[TResult](Func`1 action)
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)
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)
======================================================================================================================
Inner Exception Level 1 :
Source : System
Method : GetResponse
Date : 3/05/2017
Time : 1:46:49 PM
Error : The remote server returned an error: (401) Unauthorized.
Stack Trace : at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Kishor Kumar Profile Picture
    3,710 on at

    Check whether your using the latest plugin registration tool with dynamics crm  Mila

  • MilaP Profile Picture
    17 on at

    Hi,

    Yes I think so, I downloaded the latest version of SDK from here www.microsoft.com/.../details.aspx

  • Suggested answer
    Kishor Kumar Profile Picture
    3,710 on at

    Mila, just check it once again by closing the plugin registration tool and start it from the SDK folder with correct credentials, I think its due to authentication issue I guess.

  • MilaP Profile Picture
    17 on at

    It did not help, same issue ((

  • Nick.Doelman Profile Picture
    1,947 Most Valuable Professional on at

    Are you using a "Delegated Admin" account?  (An account a Microsoft partner would use to access thier client's D365/CRM online systems)

    I found that the SDK tools will not work with those accounts.  

    Cheers

    Nick

  • PZ123 Profile Picture
    on at

    Hello, I am receiving the same error. Can anyone provide a fix for this or more detail? Thanks in advanced.

  • Suggested answer
    Beau Lewis Profile Picture
    5 on at

    Hi,

    It looks like you might be using an older reference in the plugin. I would suggest using NuGet and updating the plugin to use the newest version of the plugins (8.2.1 for Dynamics 365 fall release)

  • Suggested answer
    Arpit Shrivastava Profile Picture
    7,518 User Group Leader on at

    Hello,

    Please have a look below article. It may help.

    arpitmscrmhunt.blogspot.in/.../dynamics-crm-v9-unable-to-connect.html

    Mark the anwser verified. If your issue resolve

    Cheers

    Arpit

  • Community Member Profile Picture
    on at

    Hi,

    Just in case some else lands here.

    We had the same problem.

    You need to use nuget to pull down the latest plugin registration tool as a nuget package.

    Visual Studio then installs the tool in your packages directory.

    If you run that one it should work.

    regards,

    Don

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans