Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Unable to fetch CRM 2015 Online entity metadata

Posted on by Microsoft Employee

Hi All,

I'm using the Microsoft sample code (completely unmodified) from the CRM 2015 SDK which allows you to fetch your entity metadata and render some diagrams in Visio VSD format. Exactly as per this:

http://msdn.microsoft.com/en-us/library/jj602918.aspx

I've successfully built the tool which is called "MetadataDiagramConsole" and am running it from a command prompt. It seems to connect to my CRM instance OK and then prompts me for credentials...

Then it crashed out with the following error:

C:\CRMSDK\SDK\SampleCode\CS\Metadata\Diagram\bin\Debug>MetadataDiagramConsole
Enter a CRM server name and port [crm.dynamics.com]: disco.XXXX.dynamics.com/XRM
Services/2011/Discovery.svc
Is this server configured for Secure Socket Layer (https) (y/n) [n]: y

Enter Username: XXXXX@onmicrosoft.com
Enter Password: *********

The application terminated with an error.
Value cannot be null.
Parameter name: identityProvider
Rendering complete. Press any key to continue.

Any tips or suggestions greatly appreciated.

Many thanks

Aaron.

*This post is locked for comments

  • RE: Unable to fetch CRM 2015 Online entity metadata

    I get the same error for one of my two instances.

    For the First Instance everything works excellent while for the second I always get the saem error. Should it be an issue of MS?

  • Jayrajsinh Profile Picture
    Jayrajsinh 15 on at
    RE: Unable to fetch CRM 2015 Online entity metadata

    Thanks Aron for your reply..

    I have tried to connect through XRM Tool as well..unfortunately I getting same error.

    Regards,

    Jayraj

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unable to fetch CRM 2015 Online entity metadata

    Hi again,

    Can you connect successfully using this tool?

    xrmtoolbox.codeplex.com

    Cheers

    Aaron.

  • Jayrajsinh Profile Picture
    Jayrajsinh 15 on at
    RE: Unable to fetch CRM 2015 Online entity metadata

    Hi Aaron,

    Thanks for your reply. As per SETTINGS>Customization>Developer Resource; my discovery services is as follows:

    2514.CRMVersion.jpg

    CRM Version

    When I try to connect through Plug-in registration(SDK 2015 and SDK 2013) I get below error:

    Connect option Office 365:

    ======================================================================================================================

    Source : Microsoft.Xrm.Sdk
    Method : ThrowIfNull
    Date : 12/18/2014
    Time : 3:43:21 AM
    Error : Value cannot be null.
    Parameter name: identityProvider
    Stack Trace : at Microsoft.Xrm.Sdk.ClientExceptionHelper.ThrowIfNull(Object parameter, String name)
    at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateOnlineFederationInternal(AuthenticationCredentials authenticationCredentials)
    at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Authenticate(AuthenticationCredentials authenticationCredentials)
    at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.ClaimsIFDFailOverAuth[T](IServiceManagement`1 servicecfg, Uri homeRealm, ClientCredentials userCredentials, ClientCredentials deviceCredentials, Int32 depthLevel, Boolean tryNetworkCred)
    at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.CreateAndAuthenticateProxy[T](IServiceManagement`1 servicecfg, Uri ServiceUri, Uri homeRealm, ClientCredentials userCredentials, ClientCredentials deviceCredentials, String LogString)
    at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.DiscoverOrganizations(Uri discoveryServiceUri, Uri homeRealmUri, ClientCredentials clientCredentials, ClientCredentials deviceCredentials)
    at Microsoft.Xrm.Tooling.CrmConnectControl.CrmConnectionManager.QueryLiveDiscoveryServer(ClientCredentials liveCreds, Uri discoServer)
    at Microsoft.Xrm.Tooling.CrmConnectControl.CrmConnectionManager.FindCrmOnlineDiscoveryServer(ClientCredentials liveCreds)
    at Microsoft.Xrm.Tooling.CrmConnectControl.CrmConnectionManager.ValidateServerConnection(CrmOrgByServer selectedOrg)
    ======================================================================================================================

    Connect option Online:

    Source : mscorlib
    Method : HandleReturnMessage
    Date : 12/18/2014
    Time : 3:43:11 AM
    Error : An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.
    Stack Trace : Server stack trace:
    at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout)
    at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.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.IdentityModel.Protocols.WSTrust.IWSTrustContract.Issue(Message message)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr)
    at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateLiveIdInternal(ClientCredentials clientCredentials, SecurityTokenResponse deviceToken, String keyType)
    at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Authenticate(ClientCredentials clientCredentials, SecurityTokenResponse deviceTokenResponse, String keyType)
    at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Authenticate(ClientCredentials clientCredentials, SecurityTokenResponse deviceTokenResponse)
    at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateLiveIdInternal(AuthenticationCredentials authenticationCredentials)
    at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Authenticate(AuthenticationCredentials authenticationCredentials)
    at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.ClaimsIFDFailOverAuth[T](IServiceManagement`1 servicecfg, Uri homeRealm, ClientCredentials userCredentials, ClientCredentials deviceCredentials, Int32 depthLevel, Boolean tryNetworkCred)
    at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.CreateAndAuthenticateProxy[T](IServiceManagement`1 servicecfg, Uri ServiceUri, Uri homeRealm, ClientCredentials userCredentials, ClientCredentials deviceCredentials, String LogString)
    at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.DiscoverOrganizations(Uri discoveryServiceUri, Uri homeRealmUri, ClientCredentials clientCredentials, ClientCredentials deviceCredentials)
    at Microsoft.Xrm.Tooling.CrmConnectControl.CrmConnectionManager.QueryLiveDiscoveryServer(ClientCredentials liveCreds, Uri discoServer)
    at Microsoft.Xrm.Tooling.CrmConnectControl.CrmConnectionManager.FindCrmOnlineDiscoveryServer(ClientCredentials liveCreds)
    at Microsoft.Xrm.Tooling.CrmConnectControl.CrmConnectionManager.ValidateServerConnection(CrmOrgByServer selectedOrg)
    ======================================================================================================================
    Inner Exception Level 1 :
    Source : Not Provided
    Method : Not Provided
    Date : 12/18/2014
    Time : 3:43:11 AM
    Error : Authentication Failure
    Stack Trace : Not Provided

     


    I get the same error from SDK:

    Error : Value cannot be null.
    Parameter name: identityProvide

     

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unable to fetch CRM 2015 Online entity metadata

    Hi Jayrajsinh,

    From my limited knowledge around this, I think if you have an XXX@MYORG.onmicrosoft.com account then you are using Office 365. But if you have your own unique email address as you point out, then you actually have to use a separate web service URL.

    Which web service URL are you trying to connect to?

    Take a look at this:
    http://msdn.microsoft.com/en-us/library/gg328127.aspx

    Make sure you're connecting to the correct region's server and also using the correct one for your account type.

  • Jayrajsinh Profile Picture
    Jayrajsinh 15 on at
    RE: Unable to fetch CRM 2015 Online entity metadata

    Hi Aaron,

    I am getting same error.. (Value cannot be null. Parameter name: identityProvider).. I am able to log-in to CRM but not able to connect through SDK or Plug-in registration tool.

    My user name is user@companyname.com its not user@MYORG.onmicrosoft.com

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unable to fetch CRM 2015 Online entity metadata

    Thanks Guido.

    Your post prompted me to realise something very obvious.. I was using user@onmicrosoft.com rather than user@MYORG.onmicrosoft.com! Doh!

    It works perfectly now and I am fetching data live from CRM Online...

    Stupid simple mistake...

    Many thanks!

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unable to fetch CRM 2015 Online entity metadata

    I am beginning to think there is an issue on the server at Microsoft's end. I.e. something is corrupted with my instance.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unable to fetch CRM 2015 Online entity metadata

    I also tried this tool: xrmearlyboundgenerator.codeplex.com

    And I get exactly the same value cannot be null error.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans