RoleProxy AddRole Method (Role) CelloSaaS API Documentation
Adds a new role to the system.

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 AddRole(
	Role roleDetails
)

Return Value

Type: String
Inserted Role Id
Exceptions

ExceptionCondition
System.Data DataExceptionIf the role name is duplicate
[!:CelloSaaS.ServiceContracts.AccessControlManagement.RoleException]If pre or post processor was not inserted.
System ArgumentNullExceptionIf role name or description is null or empty.
System ArgumentExceptionIf role details is null
Examples

public void AddRole()
{  
   Role roleDetails = new Role();
   roleDetails.TenantId = "B590CD25-3093-DF11-8DEB-001EC9DAB123";
   roleDetails.RoleName = "Tenant_Admin";        
   roleDetails.Description = "Tenant Admin Role";  
   string roleId = RoleProxy.AddRole(roleDetails);
}
See Also