Click or drag to resize

KeeperSecurity.Enterprise Namespace

Provides types for manipulating Keeper Enterprise data.
Classes
 ClassDescription
Public classAccountTransferResult Defines Transfer Account Result properties
Public classAuditLogExtensions Enterprise Audit Log access methods.
Public classDeviceApprovalData Represent Device Approval Queue data.
Public classEnterpriseData Represents decrypted basic Enterprise data structures: Nodes, Users, Teams
Public classEnterpriseException Cannot proceed with enterprise operation.
Public classEnterpriseExtensions Miscellaneous Enterprise Methods
Public classEnterpriseLoader Represents Keeper Enterprise connection that incrementally loads requested enterprrise data.
Public classEnterpriseManagedCompany Represents Enterprise Managed Company.
Public classEnterpriseNode Represents Enterprise Node.
Public classEnterpriseQueuedTeam Represents Queued Team
Public classEnterpriseRole Represents Enterprise Role
Public classEnterpriseTeam Represents Enterprise Team.
Public classEnterpriseUser Represents Enterprise User
Public classInviteUserOptions Defines optional Invite User properties
Public classManagedCompanyData Represends Managed Companies enterprise data.
Public classManagedCompanyLicenseAddOn Represends Managed Company Add-On
Public classManagedCompanyOptions Represends Managed Companies create/update options
Public classQueuedTeamData Represents Queued Team Enterprise Plugin
Public classRoleData Represents Role enterprise data.
Interfaces
 InterfaceDescription
Public interfaceIEnterpriseDataManagement Defines methods for modifying enterprise users and teams.
Public interfaceIMspManagement Defines Managed Company actions
Public interfaceIQueuedTeamData Defines Queued Team storage
Public interfaceIRoleData Defines Role enterprise data.
Enumerations
 EnumerationDescription
Public enumerationUserStatus Specifies Enterprise User statuses.
Example
C#
using System.Linq;
using System.Threading.Tasks;
using KeeperSecurity.Authentication;
using KeeperSecurity.Enterprise;

internal static class Program
{
    private static async Task Main()
    {
        IAuthentication auth = await ConnectToKeeperAs("username@company.com");
        if (auth.AuthContext.IsEnterpriseAdmin)
        {
            // Load base enterprise data.
            var enterprise = new EnterpriseData();
            var enterpriseLoader = new EnterpriseLoader(auth, new[] { enterprise });
            await enterpriseLoader.Load();

            // Find team with name "Google".
            var team = enterprise.Teams
                .FirstOrDefault(x => string.Equals(x.Name, "Google", System.StringComparison.InvariantCultureIgnoreCase));
           if (team == null)
            {
                // Create team.
                team = await enterprise.CreateTeam(new EnterpriseTeam
                {
                    Name = "Google",
                    RestrictEdit = false,
                    RestrictSharing = true,
                    RestrictView = false,
                });
            }

            // Add users to the "Google" team.
            await enterprise.AddUsersToTeams(
                new[] { "username@company.com", "username1@company.com" },
                new[] { team.Uid });
        }
    }
}
See Also

Reference

IEnterpriseLoader
EnterpriseData