none
Retrieving project owner name RRS feed

  • Question

  • Project Server 2013

    We have a page hosted in SharePoint that needs to display the owner of projects that the current user has access to.  We have the project GUID for each project, but are not able to get the owner of the projects unless we basically give users full control of PWA (which is not acceptable).

    We are using the JavaScript CSOM for Project Server 2013.  The code is similar to the following:

    owner = context.get_projects().getByGuid(projectGuid).get_owner();
    context.load(owner);
    context.executeQueryAsync(ownerLoaded, queryFailed);
    
    function ownerLoaded(sender, args) {
    	var owner_name = owner.get_title();
    }

    The call to owner.get_title() fails because the owner object is not loaded, because the average user apparently does not have permissions to retrieve owners. The error in the ULS logs is:

    Permission denied: User i:0#.w|<username> does not have global permission 'ManageUsersAndGroups'

    Is there a more restricted permission we can grant users so they are able to retrieve this information, or is there a different PS API we can call from JavaScript to get the project owners?


    Friday, September 13, 2013 12:58 AM