title: Retrieving ITokenService from CRM Workflow context
body: <p>Currently i'm working on a CRM project. In this project i have to send data to web service. This operation must be work on custom workflow. In order to make web service call i need Authentication token, Currently i am trying to get ITokenService from CodeActivityContext, which is retrieving null, Any suggestions how to get ITokenService in workflow context?</p>
  
  <pre><code>&gt;
  protected override void Execute(CodeActivityContext executionContext)
  {
      IWorkflowContext context = executionContext.GetExtension&lt;IWorkflowContext&gt;();
      IOrganizationServiceFactory serviceFactory = executionContext.GetExtension&lt;IOrganizationServiceFactory&gt;();
      ITracingService tracingService = executionContext.GetExtension&lt;ITracingService&gt;();
      ITokenService TokenService = (ITokenService)executionContext.GetExtension&lt;ITokenService&gt;();
      if(TokenService == null) throw new InvalidOperationException("Token service is null");
      serviceFactory.CreateOrganizationService(context.UserId)
  
      try
      {
          //do something
      }
      catch
      {
          //do something
      }
  }
  </code></pre>