how to change "project owner" using PSI 2010 RRS feed

  • Question

  • Hi everyone,

    I've just faced a weird situation. when I'm going to change "project owner" via PSI, it returns error 1056 (Invalid project owner) except when the user is in "administrator" group. I'm sure it doesn't matter which groups the user belongs to ,either administrator or project manager or even team member to be a project owner.

    var projectDataSet = this.GetProjectDataSet(projectInfo.ProjectUID);
            var orginalProject = this.GetProject(projectInfo.ProjectUID, projectDataSet);
            var sessionUID = this.CheckOutProject(projectInfo.ProjectUID);
    if (!string.IsNullOrEmpty(projectInfo.ProjectOwnerName))
                var resourceManager = new Resource();
                var ownerResource = resourceManager.GetResource(projectInfo.ProjectOwnerName);
                if (ownerResource == null)
                    throw new Exception("this is not valid");
                orginalProject.ProjectOwnerID = ownerResource.ResourceUID;
    this.UpdateProject(sessionUID, projectDataSet);

    I would appreciate any help

    Best regards

    Sunday, January 24, 2016 10:02 AM