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
<PackageReference Include="BeeQ.FileStorage.OneDrive" Version="1.0.0" />
<PackageVersion Include="BeeQ.FileStorage.OneDrive" Version="1.0.0" />
<PackageReference Include="BeeQ.FileStorage.OneDrive" />
paket add BeeQ.FileStorage.OneDrive --version 1.0.0
#r "nuget: BeeQ.FileStorage.OneDrive, 1.0.0"
#:package BeeQ.FileStorage.OneDrive@1.0.0
#addin nuget:?package=BeeQ.FileStorage.OneDrive&version=1.0.0
#tool nuget:?package=BeeQ.FileStorage.OneDrive&version=1.0.0
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
- Configure the provider with Azure AD credentials and a target drive.
- Obtain an IOneDriveService (via your file-storage builder or DI container).
- 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, configureOnCreateIdto provide identifiers for new files.
License
See the repository LICENSE for licensing details.
| Product | Versions 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. |
-
net10.0
- Azure.Identity (>= 1.21.0)
- BeeQ.FileStorage (>= 1.3.0)
- Microsoft.Graph (>= 6.6.0)
-
net8.0
- Azure.Identity (>= 1.21.0)
- BeeQ.FileStorage (>= 1.3.0)
- Microsoft.Graph (>= 6.6.0)
-
net9.0
- Azure.Identity (>= 1.21.0)
- BeeQ.FileStorage (>= 1.3.0)
- Microsoft.Graph (>= 6.6.0)
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 | 0 | 9/15/2026 |