BeeQ.FileStorage.OneDrive 1.0.0

dotnet add package BeeQ.FileStorage.OneDrive --version 1.0.0
                    
NuGet\Install-Package BeeQ.FileStorage.OneDrive -Version 1.0.0
                    
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="BeeQ.FileStorage.OneDrive" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BeeQ.FileStorage.OneDrive" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="BeeQ.FileStorage.OneDrive" />
                    
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 BeeQ.FileStorage.OneDrive --version 1.0.0
                    
#r "nuget: BeeQ.FileStorage.OneDrive, 1.0.0"
                    
#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 BeeQ.FileStorage.OneDrive@1.0.0
                    
#: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=BeeQ.FileStorage.OneDrive&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=BeeQ.FileStorage.OneDrive&version=1.0.0
                    
Install as a Cake Tool

BeeQ.FileStorage.OneDrive

NuGet package: BeeQ.FileStorage.OneDrive

A OneDrive-backed file storage provider for the BeeQ file storage abstractions. Use this library to store, list and manage files inside a specific OneDrive drive using Azure AD app credentials.

Installation

Install the NuGet package:

dotnet add package BeeQ.FileStorage.OneDrive

Quick start

  1. Configure the provider with Azure AD credentials and a target drive.
  2. Obtain an IOneDriveService (via your file-storage builder or DI container).
  3. Use the service to manage files and folders.

Configuration example

The provider exposes a configuration type: OneDriveConfiguration (or OneDriveConfiguration<TId> for custom identifier types).

Set the required options: TenantId, ClientId, ClientSecret and either BasePath or a PathTemplate.

// Example: configure via builder or your initialization code
builder.UseOneDrive("DRIVE_ID", options =>
{
	options.TenantId = "your-tenant-id";
	options.ClientId = "your-client-id";
	options.ClientSecret = "your-client-secret";
	options.BasePath = "/apps/myapp/files"; // optional if you provide PathTemplate
});

// For custom id types:
// builder.UseOneDrive<MyIdType>("DRIVE_ID", options => { /* configure */ });

Note: obtain the configured IOneDriveService from your file-storage builder or DI container according to your application's registration/initialization flow.

Usage examples

Assuming you have an IOneDriveService instance available:

// Check if a file exists
bool exists = await oneDriveService.Exists("folder/example.txt");

// List files in a folder
IEnumerable<FileInfoDto> files = await oneDriveService.ListFiles("folder");

// Create a folder
await oneDriveService.CreateFolder("folder/subfolder");

// Move a file to another folder
await oneDriveService.Move("folder/old.txt", "folder/subfolder");

// Copy a file
await oneDriveService.Copy("folder/old.txt", "folder/subfolder");

// Rename a file
await oneDriveService.Rename("folder/old.txt", "newname.txt");

// Create an anonymous share link for a file
string? shareUrl = await oneDriveService.CreateShareLink("folder/example.txt");

Drive discovery

You can list available drives using:

var drives = await oneDriveService.GetDrives();

Remarks

  • The library uses Azure AD client credentials to authenticate with Microsoft Graph. Ensure the app has appropriate Graph permissions to access the target drive.
  • For identifier types other than Guid, configure OnCreateId to provide identifiers for new files.

License

See the repository LICENSE for licensing details.

Product Compatible and additional computed target framework versions.
.NET 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 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 38 9/15/2026