Export (0) Print
Expand All

ReportingService2010::CreateRole Method (String^, String^, array<String^>^)

 

Applies To: SQL Server 2016 Preview

Adds a new role to the report server database. This method only applies to native mode.

Namespace:   ReportService2010
Assembly:  ReportService2010 (in ReportService2010.dll)

public:
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/CreateRole", 
	RequestNamespace = "http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
	ResponseNamespace = "http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
	Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
[SoapHeaderAttribute("TrustedUserHeaderValue")]
void CreateRole(
	String^ Name,
	String^ Description,
	array<String^>^ TaskIDs
)

Parameters

Name
Type: System::String^

The name of the new role. The value of this parameter must be between 1 and 260 characters long.

Description
Type: System::String^

A description of the new role. The value of this parameter must be between 1 and 512 characters long.

TaskIDs
Type: array<System::String^>^

An array of task IDs that represent the tasks to set for the role.

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

SOAP Header Usage

(In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue

Native Mode Required Permissions

CreateRoles (System)

SharePoint Mode Required Permissions

Not supported

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

The Name and Description parameters are required and should not be set to null (Nothing in Visual Basic). The value for Name must be unique.

You must assign at least one task to the role. You cannot combine system-level and item-level tasks within a single role. For more information about tasks, see Tasks and Permissions.

Legacy Code Example

To compile this code example, you must reference the Reporting Services WSDL and import certain namespaces. For more information, see . The following code example uses the CreateRole method to create a user role that has permissions to view folders and reports:

No code example is currently available or this language may not be supported.
Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft