Keeper.Sdk 1.1.2

dotnet add package Keeper.Sdk --version 1.1.2
                    
NuGet\Install-Package Keeper.Sdk -Version 1.1.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Keeper.Sdk" Version="1.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Keeper.Sdk" Version="1.1.2" />
                    
Directory.Packages.props
<PackageReference Include="Keeper.Sdk" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Keeper.Sdk --version 1.1.2
                    
#r "nuget: Keeper.Sdk, 1.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Keeper.Sdk@1.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Keeper.Sdk&version=1.1.2
                    
Install as a Cake Addin
#tool nuget:?package=Keeper.Sdk&version=1.1.2
                    
Install as a Cake Tool

Keeper .NET SDK

NuGet License .NET

Enterprise-grade Password Management SDK for .NET applications

Table of Contents

Overview

The Keeper .NET SDK is a comprehensive library that provides programmatic access to Keeper Password Manager's vault and administrative features. Built for .NET 8.0 and .NET Standard 2.0, it enables seamless integration of enterprise password management into your applications.

Note: All code examples in this README use the current SDK API (v16+). The authentication flow uses AuthSync, JsonConfigurationStorage, and SimpleInputManager for console applications. For working examples, see the Sample Applications section.

Features

  • Authentication - Secure authentication with support for 2FA/MFA
  • Vault Access - Complete access to records, folders, and shared folders
  • CRUD Operations - Full lifecycle management for:
  • Password records and custom fields
  • File attachments
  • Folders and shared folders
  • Team Management - Administrative functions for enterprise accounts
  • Sync Operations - Real-time vault synchronization
  • BreachWatch - Monitor and detect compromised credentials
  • Extensible - Customize integration with your backend systems
  • Audit Logging - Track vault and administrative activities

Installation

Via NuGet Package Manager

dotnet add package KeeperSdk

Via Package Manager Console

Install-Package KeeperSdk

Via .csproj Reference

<PackageReference Include="KeeperSdk" Version="16.*" />

Quick Start

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 configuration = configStorage.Get();

// Use SimpleInputManager for console input
var inputManager = new SimpleInputManager();

// Login to Keeper using AuthSync
var auth = new AuthSync(configStorage);
await Utils.LoginToKeeper(auth, inputManager, "your-email@company.com");

// Create vault instance and sync
var vault = new VaultOnline(auth);
await vault.SyncDown();

// Access records
foreach (var record in vault.KeeperRecords)
{
    Console.WriteLine($"Record: {record.Title}");
    if (record is PasswordRecord passwordRecord)
    {
        Console.WriteLine($"  Login: {passwordRecord.Login}");
        Console.WriteLine($"  URL: {passwordRecord.Link}");
    }
}

Creating a New Record

using System.Linq;
using KeeperSecurity.Vault;

// Create a typed login record
var loginRecord = new TypedRecordFacade<LoginRecordType>();
loginRecord.Fields.Login = "admin@myapp.com";
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}");

Core Capabilities

Authentication (KeeperSecurity.Authentication)

  • AuthSync - Synchronous authentication flow
  • Email/password - Master password authentication
  • Two-factor authentication (2FA) - TOTP, SMS, and push notifications
  • Device approval - Email and admin approval flows
  • Device token management - Persistent device tokens
  • Session management - Automatic session handling
  • SSO integration - Enterprise SSO support
  • Biometric authentication - WebAuthn/FIDO2 support
  • Input management - Console and GUI input handlers via IInputManager

Vault Operations (KeeperSecurity.Vault)

  • Records: Create, read, update, delete password records
  • Attachments: Upload and download file attachments
  • Folders: Organize records in folders
  • Shared Folders: Collaborate with team members
  • Search: Find records by title, URL, or custom fields

Enterprise Management (KeeperSecurity.Enterprise)

  • User management
  • Team management
  • Role-based access control (RBAC)
  • Audit log retrieval
  • Device approval
  • Managed company operations

Configuration (KeeperSecurity.Configuration)

  • JSON-based configuration
  • Secure storage options
  • Custom storage providers

Code Examples

Password Change

using System;
using System.Linq;

// Find record by title
var record = vault.KeeperRecords
    .FirstOrDefault(x => x.Title == "Database");

if (record != null)
{
    if (record is PasswordRecord passwordRecord)
    {
        // Update legacy password record
        passwordRecord.Password = "NewSecurePassword123!";
        await vault.UpdateRecord(passwordRecord);
        Console.WriteLine("Password rotated successfully");
    }
    else if (record is TypedRecord typedRecord)
    {
        // Update typed record password field
        var passwordField = typedRecord.FindTypedField(new RecordTypeField("password", "Password"));
        if (passwordField != null)
        {
            passwordField.ObjectValue = "NewSecurePassword123!";
            await vault.UpdateRecord(typedRecord);
            Console.WriteLine("Password rotated successfully");
        }
    }
}

Working with Attachments

using System.IO;
using System.Linq;
using KeeperSecurity.Commands;

// Upload attachment from file
using (var stream = File.OpenRead("config.json"))
{
    var uploadTask = new FileAttachmentUploadTask("config.json")
    {
        Title = "Configuration File",
        MimeType = "application/json"
    };
    await vault.UploadAttachment(record, uploadTask);
}

// Or upload from memory stream
using (var stream = new MemoryStream(fileContent))
{
    var uploadTask = new AttachmentUploadTask(stream)
    {
        Title = "Configuration File",
        Name = "config.json",
        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);
    }
}

// Delete attachment
if (attachment != null)
{
    await vault.DeleteAttachment(record, attachment.Id);
}

Shared Folder Management

using System;
using System.Linq;
using KeeperSecurity.Vault;

// Get shared folder
var sharedFolder = vault.SharedFolders
    .FirstOrDefault(x => x.Name == "Team Credentials");

if (sharedFolder != null)
{
    // Add user to shared folder with permissions
    await vault.PutUserToSharedFolder(
        sharedFolder.Uid,
        "user@company.com",
        UserType.User,
        new SharedFolderUserOptions
        {
            ManageRecords = true,
            ManageUsers = false
        }
    );
    
    // Move record to shared folder
    await vault.MoveRecords(
        new[] { new RecordPath { RecordUid = recordUid } },
        sharedFolder.Uid,
        link: true  // true to link, false to move
    );
}

Enterprise User Management

using System;
using System.Linq;
using KeeperSecurity.Enterprise;

// Check if user has enterprise admin privileges
if (auth.AuthContext.IsEnterpriseAdmin)
{
    // Load enterprise data
    var enterprise = new EnterpriseData();
    var enterpriseLoader = new EnterpriseLoader(auth, new[] { enterprise });
    await enterpriseLoader.Load();
    
    // List users
    foreach (var user in enterprise.Users)
    {
        Console.WriteLine($"User: {user.Email} - Status: {user.Status}");
    }
    
    // Find or create team
    var team = enterprise.Teams
        .FirstOrDefault(x => x.Name == "Engineering");
    
    if (team == null)
    {
        team = await enterprise.CreateTeam(new EnterpriseTeam
        {
            Name = "Engineering",
            RestrictEdit = false,
            RestrictSharing = true,
            RestrictView = false
        });
    }
    
    // Add users to team
    await enterprise.AddUsersToTeams(
        new[] { "user1@company.com", "user2@company.com" },
        new[] { team.Uid },
        Console.WriteLine  // Progress callback
    );
}

Requirements

Target Frameworks

  • .NET 8.0 - Latest .NET version with improved performance
  • .NET Standard 2.0 - Broad compatibility with .NET Framework and .NET Core

Dependencies

  • BouncyCastle.Cryptography (>= 2.2.1) - Cryptographic operations
  • Google.Protobuf (>= 3.25.0) - Protocol buffer serialization
  • Newtonsoft.Json (>= 13.0.3) - JSON serialization
  • System.Data.SQLite.Core (>= 1.0.118) - SQLite storage

Supported Platforms

  • ✅ Windows (10+, Server 2019+)
  • ✅ macOS (11.0+)
  • ✅ Linux (Ubuntu 20.04+, RHEL 8+)

Documentation

Official Resources

Sample Applications

Working Examples

Sample Description Path
Basic Auth Simple authentication and vault sync BasicAuthExample.cs
Full Featured Comprehensive SDK feature demonstration Program.cs
Commander CLI Command-line application Commander/
WPF Desktop Windows desktop application WPFSample/

Running the Samples

# Clone repository
git clone https://github.com/Keeper-Security/keeper-sdk-dotnet.git
cd keeper-sdk-dotnet/Sample

# Run basic example
dotnet run

Testing

# Run unit tests
cd Tests
dotnet test

# Run with coverage
dotnet test /p:CollectCoverage=true

Security Best Practices

  1. Never hardcode credentials - Use configuration files or environment variables
  2. Secure storage - Use encrypted storage for device tokens and configuration
  3. Handle secrets carefully - Clear sensitive data from memory after use
  4. Validate input - Always validate user input before operations
  5. Keep updated - Regularly update to the latest SDK version for security patches

Development Setup

# Clone the repository
git clone https://github.com/Keeper-Security/keeper-sdk-dotnet.git
cd keeper-sdk-dotnet

# Restore dependencies
dotnet restore

# Build the project
dotnet build

# Run tests
dotnet test

License

This project is licensed under the MIT License - see the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Keeper.Sdk:

Package Downloads
Keeper.Cli

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.2 0 10/29/2025
1.1.2-beta05 425 10/3/2025
1.1.2-beta04 167 9/30/2025
1.1.2-beta03 299 9/16/2025
1.1.2-beta02 177 9/3/2025
1.1.2-beta01 79 8/3/2025
1.1.1 4,666 7/22/2025
1.1.1-beta07 165 6/30/2025
1.1.1-beta06 4,641 3/27/2025
1.1.1-beta05 221 3/27/2025
1.1.1-beta04 368 3/18/2025
1.1.1-beta03 449 3/13/2025
1.1.1-beta02 503 3/5/2025
1.1.1-beta01 247 3/4/2025
1.1.0 5,818 2/27/2025
1.1.0-beta02 657 2/18/2025
1.1.0-beta01 1,477 11/19/2024
1.0.7-beta02 162 10/5/2025
1.0.7-beta01 189 11/19/2024
1.0.6 5,853 11/7/2024
1.0.5 3,943 8/27/2024
1.0.5-beta25 155 7/16/2024
1.0.5-beta24 885 6/29/2024
1.0.5-beta23 157 6/23/2024
1.0.5-beta22 162 6/23/2024
1.0.5-beta21 168 6/20/2024
1.0.5-beta20 148 6/9/2024
1.0.5-beta19 5,450 4/15/2024
1.0.5-beta18 653 3/14/2024
1.0.5-beta16 192 2/13/2024
1.0.5-beta15 271 11/23/2023
1.0.5-beta14 179 11/14/2023
1.0.5-beta13 4,737 10/31/2023
1.0.5-beta12 927 10/9/2023
1.0.5-beta10 836 9/26/2023
1.0.5-beta09 931 9/13/2023
1.0.5-beta06 367 3/28/2023
1.0.5-beta05 7,324 2/8/2023
1.0.5-beta04 272 2/7/2023
1.0.5-beta03 402 1/31/2023
1.0.5-beta02 292 1/26/2023
1.0.5-beta01 282 1/26/2023
1.0.4 10,822 10/28/2022
1.0.4-beta12 284 6/23/2023 1.0.4-beta12 is deprecated because it has critical bugs.
1.0.4-beta11 480 9/27/2022
1.0.4-beta10 398 8/5/2022
1.0.4-beta09 1,042 8/4/2022
1.0.4-beta08 2,420 7/7/2022
1.0.4-beta07 340 6/25/2022
1.0.4-beta06 3,145 5/24/2022
1.0.4-beta05 323 5/18/2022
1.0.4-beta03 1,216 4/19/2022
1.0.4-beta02 400 4/8/2022
1.0.4-beta01 1,040 1/27/2022
1.0.3 7,390 1/20/2022
1.0.3-beta05 706 1/4/2022
1.0.3-beta04 331 12/15/2021
1.0.3-beta03 307 12/15/2021
1.0.3-beta02 1,028 11/20/2021
1.0.2-beta03 396 8/2/2021
1.0.2-beta02 395 7/8/2021
1.0.2-beta01 377 7/3/2021
1.0.1 1,438 6/1/2021
1.0.0 686 3/20/2021
0.9.9 705 2/22/2021
0.9.9-beta06 540 1/6/2021
0.9.8 642 12/8/2020
0.9.7 1,049 12/8/2020
0.9.7-alpha3 564 5/20/2020
0.9.7-alpha2 483 5/13/2020
0.9.7-alpha1 485 5/13/2020
0.9.6 993 4/30/2020
0.9.5-beta1 572 4/30/2020
0.9.5-alpha3 533 4/29/2020
0.9.5-alpha2 526 4/23/2020
0.9.5-alpha1 554 4/21/2020
0.9.3 717 6/18/2020
0.9.2 763 1/24/2020
0.9.1 712 1/7/2020