.NET Developer Setup
Instructions for installation of .Net-based Commander CLI from source code
.Net SDK
The Keeper .NET SDK provides comprehensive programmatic access to Keeper Password Manager's vault and administrative features. Built for modern .NET applications, it enables seamless integration of enterprise password management, privileged access management, and secrets management capabilities.
Key Features
Secure vault access and synchronization
Complete record lifecycle management
Enterprise user and team administration
Automated password rotation
Folder and shared folder management
File attachment operations
BreachWatch integration
Cross-platform support (Windows, macOS, Linux)
Installation
Via NuGet Package Manager
dotnet add package Keeper.SdkVia .csproj Reference
<PackageReference Include="Keeper.Sdk" Version="1.1.2" />SDK Components
Core SDK Library
The main SDK library for programmatic access:
Source Code: KeeperSdk on GitHub
Getting Started : KeeperSdk README
Documentation: KeeperSdk Documentation
NuGet Package: Keeper.Sdk
DotNet Commander CLI
Full-featured command-line application for vault management:
Source Code: Commander on GitHub
Getting Started: Commander README
Documentation: KeeperSdk Documentation
Features: Interactive shell, batch operations, enterprise administration
PowerCommander Module
PowerShell module for automation and scripting:
Installation:
Install-Module -Name PowerCommanderSource Code: PowerCommander on GitHub
Getting Started: PowerCommander README
Documentation: KeeperSdk Documentation
Developer Requirements
Target Frameworks
.NET 8.0 - Latest .NET version with improved performance
.NET Standard 2.0 - Broad compatibility with .NET Framework and .NET Core
Supported Platforms
✅ Windows (10+, Server 2019+)
✅ macOS (11.0+)
✅ Linux (Ubuntu 20.04+, RHEL 8+)
Development Prerequisites
.NET 8.0 SDK or later
Visual Studio 2022, VS Code, or JetBrains Rider (recommended)
A Keeper Security account (sign up here)
Source Integrations
For source integration into your .Net code, please utilize the KeeperSDK Library source code: https://github.com/Keeper-Security/keeper-sdk-dotnet/tree/release/KeeperSdk
API Documentation
Comprehensive API reference documentation:
Full API Reference: Keeper SDK API Documentation
Key Namespaces
Authentication, 2FA, device approval, SSO
Vault operations, records, folders, attachments
Enterprise administration, users, teams, roles
Configuration storage and management
Core Capabilities
Authentication
AuthSync - Synchronous authentication flow
Master Password - Standard Keeper authentication
Two-Factor (2FA) - TOTP, SMS, push notifications
Device Approval - Email and admin approval flows
SSO Integration - Enterprise single sign-on
Biometric - WebAuthn/FIDO2 support
Vault Operations
Records - Create, read, update, delete records
Typed Records - Support for all Keeper record types and custom record types
Attachments - Upload and download file attachments
Folders - Organise records in folder hierarchy
Shared Folders - Team collaboration and permissions
Search - Find records by title, URL, or custom fields
Enterprise Management
User Management - Create, modify, delete enterprise users
Team Management - Organise users into teams
Role-Based Access - Manage roles and permissions
Audit Logs - Retrieve and analyse audit trail
Device Management - Approve and manage devices
Managed Companies - MSP multi-tenant operations
Security Features
End-to-End Encryption - Zero-knowledge architecture
Device Token Management - Secure persistent sessions
BreachWatch - Monitor compromised credentials
Password Reports - Generate security compliance reports
Getting Started Resources
Documentation
Support
Get Help
Email: [email protected]
GitHub Issues: Report bugs or request features
Website: keepersecurity.com
Enterprise Support
For enterprise support, custom integrations, or technical assistance, contact our team at [email protected].
Examples
For help with implementation of SDK features, please see the Sample Application: https://github.com/Keeper-Security/keeper-sdk-dotnet/tree/master/Sample
The .Net Commander CLI Sample App contains several basic operations such as logging in, authentication with two-factor, loading and decrypting the vault and updating passwords. https://github.com/Keeper-Security/keeper-sdk-dotnet/tree/release/Commander
We use InputManager class to deal with console inputs in below examples. The implementation can be found at https://github.com/Keeper-Security/keeper-sdk-dotnet/blob/master/Cli/InputManager.cs
Basic Authentication and Vault Access
using System;
using System.Linq;
using System.Threading.Tasks;
using Cli;
using KeeperSecurity.Authentication;
using KeeperSecurity.Authentication.Sync;
using KeeperSecurity.Configuration;
using KeeperSecurity.Vault;
// Initialize configuration storage
var configStorage = new JsonConfigurationStorage("config.json");
var inputManager = new SimpleInputManager();
// Login to Keeper using AuthSync
var auth = new AuthSync(configStorage);
await Utils.LoginToKeeper(auth, inputManager, "[email protected]");
// Create vault instance and sync
var vault = new VaultOnline(auth);
await vault.SyncDown();
// Access records
Console.WriteLine($"Your vault has {vault.RecordCount} records.");Creating a New Record
// Create a typed login record
var loginRecord = new TypedRecordFacade<LoginRecordType>();
loginRecord.Fields.Login = "[email protected]";
loginRecord.Fields.Password = "SecurePassword123!";
loginRecord.Fields.Url = "https://myapp.com";
var typedRecord = loginRecord.TypedRecord;
typedRecord.Title = "My Application";
typedRecord.Notes = "Production credentials";
var createdRecord = await vault.CreateRecord(typedRecord);
Console.WriteLine($"Record created with UID: {createdRecord.Uid}");Change Password
// Find and update a password
var record = vault.KeeperRecords
.FirstOrDefault(x => x.Title == "Database");
if (record is PasswordRecord passwordRecord)
{
passwordRecord.Password = "NewSecurePassword123!";
await vault.UpdateRecord(passwordRecord);
Console.WriteLine("Password rotated successfully");
}Working with Attachments
using System.IO;
using KeeperSecurity.Commands;
// Upload attachment
using (var stream = File.OpenRead("config.json"))
{
var uploadTask = new FileAttachmentUploadTask("config.json")
{
Title = "Configuration File",
MimeType = "application/json"
};
await vault.UploadAttachment(record, uploadTask);
}
// Download attachment
var attachment = vault.RecordAttachments(record).FirstOrDefault();
if (attachment != null)
{
using (var stream = File.Create(attachment.Title))
{
await vault.DownloadAttachment(record, attachment.Id, stream);
}
}Shared Folder Management
// Get shared folder
var sharedFolder = vault.SharedFolders
.FirstOrDefault(x => x.Name == "Team Credentials");
// Add user to shared folder
await vault.PutUserToSharedFolder(
sharedFolder.Uid,
"[email protected]",
UserType.User,
new SharedFolderUserOptions
{
ManageRecords = true,
ManageUsers = false
}
);Enterprise User Management
using KeeperSecurity.Enterprise;
if (auth.AuthContext.IsEnterpriseAdmin)
{
// Load enterprise data
var enterprise = new EnterpriseData();
var loader = new EnterpriseLoader(auth, new[] { enterprise });
await loader.Load();
// Create team
var team = await enterprise.CreateTeam(new EnterpriseTeam
{
Name = "Engineering",
RestrictEdit = false,
RestrictSharing = true
});
// Add users to team
await enterprise.AddUsersToTeams(
new[] { "[email protected]" },
new[] { team.Uid },
Console.WriteLine
);
}Last updated
Was this helpful?

