ReportingService2010.GetSystemPermissions ReportingService2010.GetSystemPermissions ReportingService2010.GetSystemPermissions Method

Definition

Retrieves the system permissions of the current user. This method only applies to native mode.

public:
 cli::array <System::String ^> ^ GetSystemPermissions();
[System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GetSystemPermissions", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)]
[System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")]
public string[] GetSystemPermissions ();
Public Function GetSystemPermissions () As String()
Returns
String[]

An array of String objects that contains a list of permissions associated with the system tasks and roles to which the user is assigned.

Examples

To compile this code example, you must reference the Reporting Services WSDL and import certain namespaces. For more information, see Compiling and Running Code Examples.

The following code example uses the GetSystemPermissions method to retrieve a list of permissions associated with the system tasks and roles to which the current user is assigned:

[C#]

using System;  
using System.IO;  
using System.Text;  
using System.Web.Services.Protocols;  
#endregion  

class Sample  
{  
   public static void Main()  
   {  
      ReportingService2010 rs = new ReportingService2010();  
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials;  

      string[] userpermissions = rs.GetSystemPermissions();  

      for (int t = 0; t <= userpermissions.GetUpperBound(0); t++)  
         Console.WriteLine(userpermissions[t]);  

      Console.ReadKey();  
   }  

}

Remarks

The table below shows header and permissions information on this operation.

SOAP Header Usage (In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue
Native Mode Required Permissions None
SharePoint Mode Required Permissions Not supported

This method throws an OperationNotSupportedSharePointMode exception when invoked in SharePont mode.

Applies to