locked
Statusing ImportTimesheet and impersonation RRS feed

  • Question

  • Hello,

    I am trying to call Statusing ImportTimesheet web service under impersonation context. It works if the account that is running the process is the owner of the timesheet. It imports everything, I see it in the UI, I can continue with SubmitStatus etc. But if he is not, it does not do anything but neither throw any exception. In both cases I am impersonating as the owner of the timesheet.

    I was thinking if the problem may be in impersonation code itself I am using, but as it is the same class I am using in other scenarios for impersonation and it works, I tend to believe the problem is elsewhere.

    Is method ImportTimesheet supposed to work in impersonation context at all? If not, is there any other way how to get the approved Timesheet data to tasks?

    Thanks for an answer

    P.S. I forgot to add, it is Project 2010, called through WCF services.

    Wednesday, December 22, 2010 9:16 AM

Answers

  • Finally I've managed to find the solution. The problem was in permissions granted to farm account. Impersonation and ImportTimesheet function work like a charm after granting 'Full Control' permissions to Farm Account for Project Server Service Application in SP Central Administration. See this article for details.
    • Proposed as answer by Alexander Bylinsky Thursday, November 17, 2011 12:05 AM
    • Marked as answer by Hans.H Wednesday, November 30, 2011 10:56 PM
    Thursday, November 17, 2011 12:05 AM

All replies

  • I've faced the same problem. ImportTimesheet works only for System Account. For all the other accounts it neither imports timesheet nor throws any exception when it's running without impersonation. At the same time I've found the following message in sharepoint logs:

    No timesheet existed with the specified ID. Please make sure the ID is valid and has timesheet lines to import. 

    But I've checked twice that the timeperiod and timesheet exist. And the lines I'm modifying on Timesheet Page in PWA definitely belong to these timeperiod and timesheet. Running ImportTimesheet in impersonation context throws an exception:

    The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'NTLM'.

    Can anyone shed the light on how ImportTimesheet should be used?

    Any ideas will be highly appreciated.

    Thanks.

    Friday, November 11, 2011 8:55 AM
  • Finally I've managed to find the solution. The problem was in permissions granted to farm account. Impersonation and ImportTimesheet function work like a charm after granting 'Full Control' permissions to Farm Account for Project Server Service Application in SP Central Administration. See this article for details.
    • Proposed as answer by Alexander Bylinsky Thursday, November 17, 2011 12:05 AM
    • Marked as answer by Hans.H Wednesday, November 30, 2011 10:56 PM
    Thursday, November 17, 2011 12:05 AM