2
votes

I have a long running application that needs to load a huge amount of data into CRM and it is going to take a long time to run.

I found that the token created from authentication only last for 8 hours so I am looking for a solution to renew it when the expiry time is approaching. I found a few articles on internet advising using the Authenticate() method in the OrganizationServiceProxy object.

For example:

  1. https://blog.thomasfaulkner.nz/post/2015/03/crm-organization-service-(re)authentication
  2. There is also one on StackOverflow. CRM 2011: Reauthentication with _serviceProxy.Authenticate()

So I wrote a unit test to check if it is working as expected. However, the result turns out to be that the token is not renewed.

Any ideas?

Thanks in advance.

1

1 Answers

3
votes

Maybe split the data load into batches and authenticate every X hours with a new instance of the Org Service every time??