locked
Error when accessing CRM from code RRS feed

  • Question

  • I'm getting the following error when accessing CRM from code in Azure:


    The authentication endpoint AsymmetricToken was not found on the configured Secure Token Service!
       at Microsoft.Xrm.Sdk.Client.IssuerEndpointDictionary.GetIssuerEndpoint(TokenServiceCredentialType credentialType)
       at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Issue(AuthenticationCredentials authenticationCredentials)
       at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateTokenWithACSForCrm(AuthenticationCredentials authenticationCredentials, Uri appliesTo, Uri acsEndpoint)
       at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateOnlineFederationInternal(AuthenticationCredentials authenticationCredentials)
       at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Authenticate(AuthenticationCredentials authenticationCredentials)
       at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Authenticate(ClientCredentials clientCredentials)
       at Microsoft.Xrm.Client.Services.OrganizationService.CreateUserTokenResponse(CrmConnection connection, IServiceConfiguration`1 config)
       at Microsoft.Xrm.Client.Services.OrganizationService.GetUserTokenResponse(CrmConnection connection, IServiceConfiguration`1 config)
       at Microsoft.Xrm.Client.Services.OrganizationService.ToOrganizationServiceProxy(CrmConnection connection)
       at Microsoft.Xrm.Client.Services.OrganizationService.ToOrganizationService(CrmConnection connection)
       at System.Lazy`1.CreateValue()
    --- End of stack trace from previous location where exception was thrown ---
       at Microsoft.Xrm.Client.Services.OrganizationService.InnerOrganizationService.get_Value()
       at Microsoft.Xrm.Client.Services.OrganizationService.Dispose()
       at Microsoft.Xrm.Client.CrmOrganizationServiceContext.Dispose(Boolean disposing)
       at Microsoft.Xrm.Sdk.Client.OrganizationServiceContext.Dispose()
       at Xrm.wse_Data.GetDatumsWaitingForDataFile(String filename) in C:\Users\XXXX\Documents\GitHub\XXXX\Xrm\Xrm\Data.cs:line 284
       at Scoring.AzureScoring.<FillDataRequests>d__102.MoveNext() in C:\Users\XXXX\Documents\GitHub\XXXX\Scoring\Scoring\AzureScoring.cs:line 4882
    System.NotSupportedException: The authentication endpoint AsymmetricToken was not found on the configured Secure Token Service!
       at Microsoft.Xrm.Sdk.Client.IssuerEndpointDictionary.GetIssuerEndpoint(TokenServiceCredentialType credentialType)
       at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Issue(AuthenticationCredentials authenticationCredentials)
       at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateTokenWithACSForCrm(AuthenticationCredentials authenticationCredentials, Uri appliesTo, Uri acsEndpoint)
       at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.AuthenticateOnlineFederationInternal(AuthenticationCredentials authenticationCredentials)
       at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Authenticate(AuthenticationCredentials authenticationCredentials)
       at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.Authenticate(ClientCredentials clientCredentials)
       at Microsoft.Xrm.Client.Services.OrganizationService.CreateUserTokenResponse(CrmConnection connection, IServiceConfiguration`1 config)
       at Microsoft.Xrm.Client.Services.OrganizationService.GetUserTokenResponse(CrmConnection connection, IServiceConfiguration`1 config)
       at Microsoft.Xrm.Client.Services.OrganizationService.ToOrganizationServiceProxy(CrmConnection connection)
       at Microsoft.Xrm.Client.Services.OrganizationService.ToOrganizationService(CrmConnection connection)
       at System.Lazy`1.CreateValue()
    --- End of stack trace from previous location where exception was thrown ---
       at Microsoft.Xrm.Client.Services.OrganizationService.InnerOrganizationService.get_Value()
       at Microsoft.Xrm.Client.Services.OrganizationService.Dispose()
       at Microsoft.Xrm.Client.CrmOrganizationServiceContext.Dispose(Boolean disposing)
       at Microsoft.Xrm.Sdk.Client.OrganizationServiceContext.Dispose()
       at Xrm.wse_Data.GetDatumsWaitingForDataFile(String filename) in C:\Users\XXXX\Documents\GitHub\XXXX\Xrm\Xrm\Data.cs:line 284
       at Scoring.AzureScoring.<FillDataRequests>d__102.MoveNext() in C:\Users\XXXX\Documents\GitHub\XXXX\Scoring\Scoring\AzureScoring.cs:line 4882FillDataRequests filldatarequests:yyyy\20161019_20161020_19_xxxx.csv20161019_20161020_19_xxxx.csv

    I can log into CRM using the account that is being used to access CRM in this code, and I can also log into the plugin registration tool with the same account. So how else can I investigate this on the CRM side?

    Thanks



    • Edited by CRMDev2016 Friday, October 21, 2016 12:37 PM
    Friday, October 21, 2016 12:18 PM

All replies

  • Hi,
     
    We have faced the same issue in the past. This issue was resolved after using latest assemblies.
    So please confirm if you are using the latest CRM assemblies i.e. assemblies with version 8.1.0.XXXX
     
    Thanks!
    Sam

    Inogic | Blog | news@inogic.com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Tuesday, October 25, 2016 9:29 AM
  • Thanks for your reply. It looks like it was a timeout issue, as there was a lot of data being accessed from CRM at the same time.
    Friday, October 28, 2016 11:25 AM