Adds a new role to the system.
Namespace: CelloSaaS.BusinessEdition.ServiceProxies.AccessControlManagementAssembly: CelloSaaS.BusinessEdition (in CelloSaaS.BusinessEdition.dll) Version: 4.3.1.0 (4.3.1.0)
Syntax
Parameters
- roleDetails
- Type: CelloSaaS.BusinessEdition.ServiceProxies.RoleService Role
Role Details(Mandatory - Role Name)
Return Value
Type: StringInserted Role Id
Exceptions
Exception | Condition |
---|---|
System.Data DataException | If the role name is duplicate |
[!:CelloSaaS.ServiceContracts.AccessControlManagement.RoleException] | If pre or post processor was not inserted. |
System ArgumentNullException | If role name or description is null or empty. |
System ArgumentException | If 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