EPM Project Server 2010 - PSI - Assign Project Permissions programmatically

1.7k Views Asked by At

I am needing to assign permissions to a project when it is created. I already created an event that runs when a project is created, but I'm not finding what methods of the PSI to use to assign permissions to groups and users within the project. To clarify, what I want to do is the same as is done in the "Project Permissions" section but programmatically.

If you can add a bit of code, I'll thank you. Sorry for my English :P.

Thanks Diego

1

There are 1 best solutions below

0
On

People and groups with their permissions come to Project through Security categories. In 2010 there are 2 kinds of the categories: Global categories defined in Server Settings -> Manage Categories and Project Category available through Project Permissions in Project Center. So this is about PWA.

For PSI all the things are available in WebSvcSecurity: http://msdn.microsoft.com/en-us/library/gg221489(v=office.14).aspx

Key methods are:

  • CreateCategories / CreateProjectCategories - to create any of this categories
  • ReadProjectCategory / ReadCategory - to query the categories
  • SetCategories / UpdateProjectCategories - to update the categories: add/remove users, grant/revoke permissions.