IRoleService PermanentDeleteUserRole Method (String,  String ) CelloSaaS API Documentation
Removes the given roles from the user

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

void PermanentDeleteUserRole(
	string userId,
	string[] roleIds
)

Parameters

userId
Type: System String
User Identifier(Mandatory)
roleIds
Type:  System String 
Role Identifiers(Mandatory)
Exceptions

ExceptionCondition
CelloSaaS.ServiceContracts.AccessControlManagement RoleExceptionIf db exception occurs
System UnauthorizedAccessExceptionIf user has not the privilege to delete the user role
System ArgumentNullExceptionIf role ids or user id is null or empty.
Examples

public void PermanentDeleteUserRole()
{
    string userId = "3398F837-B988-4708-999D-D3DFE11875B3";
    string[] roleIds = new string[] {"GR$Tenant_Admin", "GR$Product_Admin"};
    IRoleService roleService = ServiceLocator.Resolve>IRoleService<();
    roleService.PermanentDeleteUserRole(userId, roleIds);
}
See Also