PrivilegeProxy AddPrivilegeToRole Method CelloSaaS API Documentation
Add role privilege details

Namespace: CelloSaaS.BusinessEdition.ServiceProxies.AccessControlManagement
Assembly: CelloSaaS.BusinessEdition (in CelloSaaS.BusinessEdition.dll) Version: 4.3.1.0 (4.3.1.0)
Syntax

public static string AddPrivilegeToRole(
	string tenantIdentifier,
	RolePrivilege rolePrivilege
)

Parameters

tenantIdentifier
Type: System String
Tenant Identifier(Mandatory)
rolePrivilege
Type: CelloSaaS.BusinessEdition.ServiceProxies.PrivilegeService RolePrivilege
Role Privilege details(Mandatory)

Return Value

Type: String
Role privilege Identifier
Exceptions

ExceptionCondition
System UnauthorizedAccessExceptionIf the user has not the privilege
System.Data DataExceptionIf it is duplicate privilege id
[!:CelloSaaS.ServiceContracts.AccessControlManagement.PrivilegeException]If db exception occurs
[!:ArgumentNullException]If role privilege is null
[!:ArgumentException]If privilege id or role id is null or empty
Examples

public void AddPrivilegeToRole()
{
    string tenantIdentifier = "B590CD25-3093-DF11-8DEB-001EC9DAB123"; 
    RolePrivilege rolePrivilege = new RolePrivilege();         
    rolePrivilege.PrivilegeId = "Add_User";
    rolePrivilege.RoleId = "GR$Tenant_Admin";
    string rolePrivilegeId = PrivilegeProxy.AddPrivilegeToRole(tenantIdentifier, rolePrivilege);
}
See Also