--- myst: substitutions: ico_method: |- ```{image} /img/code_reference/net_library/method.ico :width: 15px ``` ico_prop: |- ```{image} /img/code_reference/net_library/prop.ico :width: 15px ``` --- # SecurityObject Class **Namespace:** bcpDevKit.Entities.Configuration\ **Assembly:** bcpDevKit.dll ## Syntax ```csharp public abstract class SecurityObject ``` ## Properties | Type | Name | Description | |---------------------------------------------------------|--------|------------------------------------------------------------------------| | {{ico_prop}} IEnumerable\<[UserObject]()\> | Users | Gets all the configured users. | | {{ico_prop}} IEnumerable\<[GroupObject]()\> | Groups | Gets all the configured groups. | | {{ico_prop}} IEnumerable\<[RoleObject]()\> | Roles | Gets all the configured roles (only working for Vault 2019 and above). | ## Methods | Type | Name | Description | |--------------------------------------------|----------------------------|---------------------------------------------------------------| | {{ico_method}} [UserObject]() | AddUser(string userName) | Creates a new user if no one with the specified name exists. | | {{ico_method}} [UserObject]() | GetUser(string userName) | Retrieves the user with the specified name if exists. | | {{ico_method}} [GroupObject]() | AddGroup(string groupName) | Creates a new group if no one with the specified name exists. | | {{ico_method}} [GroupObject]() | GetGroup(string groupName) | Retrieves the group with the specified name if exists. | | {{ico_method}} [RoleObject]() | AddRole(string roleName) | Creates a new role if no one with the specified name exists. | | {{ico_method}} [RoleObject]() | GetRole(string roleName) | Retrieves the role with the specified name if exists. | | {{ico_method}} void | RemoveRole(string roleName | Removes the role if one with the specified name exists. | ## Examples **Disable the export of all configuration entities** ```csharp var security = bcpService.EntitiesTable.Vault.Security; var user = security.AddUser("Angela"); ```