I'm trying to work with Project Server 2013 CSOM and I can authenticate, read any information, create new project and so, but I have problem with draft projects, in any way when I want to execute query on draft project I receive error message CSOMUnknownUser
and any thing.
In my search's I didn't get special information about this error and
here is part of my codes:
context = GetContext(pwaInstanceUrl);
// Retrieve publish project named "New Project"
// if you know the Guid of project, you can just call context.Projects.GetByGuid()
csom.PublishedProject project = GetProjectByName(projectName, context);
if(project == null)
{
Console.WriteLine("Failed to retrieve expected data, make sure you set up server data right. Press any key to continue....");
return;
}
csom.DraftProject draft = project.CheckOut();
// Retrieve project along with tasks & resources
context.Load(draft, p => p.StartDate,
p => p.Description);
context.Load(draft.Tasks, dt => dt.Where(t => t.Name == taskName));
context.Load(draft.Assignments, da => da.Where(a => a.Task.Name == taskName &&
a.Resource.Name == localResourceName));
context.Load(draft.ProjectResources, dp => dp.Where(r => r.Name == localResourceName));
context.ExecuteQuery();
I receive error on last line context.ExecuteQuery()