Admin.ReadDepartmentsByEntity Method

Reads the list of departments in Project Server for the specified entity.

Namespace:  [Admin Web service]
Service reference: http://ServerName:32843/[Project Service Application GUID]/PSI/Admin.svc
Web service reference: http://ServerName/ProjectServerName/_vti_bin/PSI/Admin.asmx?wsdl


<SoapDocumentMethodAttribute("", RequestNamespace := "",  _
    ResponseNamespace := "",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function ReadDepartmentsByEntity ( _
    entityUid As Guid, _
    entityTypeUid As Guid, _
    language As Integer _
) As DepartmentsDataSet
Dim instance As Admin
Dim entityUid As Guid
Dim entityTypeUid As Guid
Dim language As Integer
Dim returnValue As DepartmentsDataSet

returnValue = instance.ReadDepartmentsByEntity(entityUid, _
    entityTypeUid, language)
[SoapDocumentMethodAttribute("", RequestNamespace = "", 
    ResponseNamespace = "", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public DepartmentsDataSet ReadDepartmentsByEntity(
    Guid entityUid,
    Guid entityTypeUid,
    int language


  • entityUid
    Type: System.Guid
    The GUID of the specified entity.
  • entityTypeUid
    Type: System.Guid
    The GUID of the entity type.
  • language
    Type: System.Int32
    Specifies the primary language identifier that indicates the language of a country or region.

Return Value

Type: [Admin Web service].DepartmentsDataSet
Contains the list of departments for the specified entity.


The entity type can be a project, resource, or enterprise project type, or an Optimizer analysis, driver, or prioritization. You can determine the entity type by using the following properties:

The ReadDepartmentsByEntity method should not be called for a resource that does not exist. When you create a resource by using the CreateResources method, the entityUid value is temporary until the CreateResource method finishes. Then get the final RES_UID value by using the ReadResources method.

Project Server Permissions

Permissions are non-standard. Each row in the following table shows the permissions that are required for the specified type of entity.




Required for a project entity. Category permission.


Required for a resource entity. Category permission.


Required for an Optimizer analysis entity. Global permission.


Required for an Optimizer driver entity. Global permission.


Required for an Optimizer prioritization entity. Global permission.



Both permissions are required for an enterprise project type (EPT) entity. Global permission.

See Also


Admin Class

Admin Members

Admin Web Service