Security.CheckUserGlobalPermissions Method

Checks whether the current user has one or more of the specified global permissions.

Namespace:  WebSvcSecurity
Assembly:  ProjectServerWebServices (in ProjectServerWebServices.dll)


<SoapDocumentMethodAttribute("", RequestNamespace := "",  _
    ResponseNamespace := "",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function CheckUserGlobalPermissions ( _
    globalPermissionUids As Guid() _
) As Boolean()
Dim instance As Security
Dim globalPermissionUids As Guid()
Dim returnValue As Boolean()

returnValue = instance.CheckUserGlobalPermissions(globalPermissionUids)
[SoapDocumentMethodAttribute("", RequestNamespace = "", 
    ResponseNamespace = "", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public bool[] CheckUserGlobalPermissions(
    Guid[] globalPermissionUids


  • globalPermissionUids
    Type: []
    Array of GUIDs for one or more global permissions.

Return Value

Type: []
Array of Boolean values for each value in the globalPermissionUids parameter.


Use the plural CheckUserGlobalPermissions method for better performance than CheckUserGlobalPermission when you check for multiple global permissions. To check a security permission for another resource requires using impersonation to log on as that resource.

For GUID values in the globalPermissionUids parameter, use the PSSecurityCategoryPermission structure to get default global permissions, or use ReadGlobalPermissions to get the GUIDs for custom global permissions.

Project Server Permissions




Log on Project Server. Global permission.


The following example checks if the current user has three different global permissions. For additional information and a complete sample application that checks multiple global permissions, see Using Security Methods in the PSI.

using System;
using System.Net;
using PSLibrary = Microsoft.Office.Project.Server.Library;
. . .
CookieContainer cookiecontainer = new CookieContainer();
SecurityWebSvc.Security security = new SecurityWebSvc.Security();
security.Url = "http://ServerName/ProjectServerName/_vti_bin/psi/security.asmx";
security.CookieContainer = cookiecontainer;
security.Credentials = System.Net.CredentialCache.DefaultCredentials;

Guid[] permissionChecks = { 
      // Permissions for creating resources and security groups:
      // Permission for creating security categories:
   PSLibrary.PSSecurityGlobalPermission.ManageSecurity }; 

bool[] permissionResults = new bool[permissionChecks.Length];
permissionResults = security.CheckUserGlobalPermissions(permissionChecks);

bool permissionOk = true;

for (int i = 0; i < permissionResults.Length; i++)
   permissionOk = permissionOk && permissionResults[i];

if (permissionOk)
   // Continue the application.
. . .

See Also


Security Class

Security Members

WebSvcSecurity Namespace

Other Resources

Using Security Methods in the PSI

Walkthrough: Creating and Using Custom Project Server Permissions