Xrm Connection Problem RRS feed

  • Question

  • Hey

    I have an application that I am using the Xrm generated classes (CRM 4.0) and I am having a problem getting the right account to do CRUD operations.

    I am authenticating our users against AD then I validate their windows account against CRM (not every AD user has CRM access). For this I am using the Discovery service as well as the CrmService. However, all CRUD operation use the Xrm generate classes and context with LINQ. The problem is that all data operations appear to be created and modified by the service account I used in the CrmSvcUtils utilities to generate the classes. I had this account on my connection; I have since removed it and now my connection string uses integrated security (connectionString="Authentication Type=Integrated; Server=http://[server]/[Orgname];"). My question: why is this happening? My even better question: how do I fix it to use the account of the authenticated user for CRUD operations?


    Wednesday, January 29, 2014 4:22 PM

All replies

  • What type is the application ? Is it a Windows app, Console app, ASP .Net, Windows Service or something else ? This will affect how you can impersonate the current user

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Thursday, January 30, 2014 11:12 AM
  • It is an ASP.NET MVC application. I am using a service account as the account for the AD connection string to Xrm. I feel that's the reason data creation and modification appears as having been made by the service account even though the windows authenticated user has a different account.

    Any help you can give me will be deeply appreciated.


    Thursday, January 30, 2014 11:24 PM