From bbd7297b33d848bcbb8f29880f160f2f366bf5b6 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Mon, 13 Apr 2026 15:27:20 +0100 Subject: [PATCH] azureblob/auth: add Microsoft Partner Network User-Agent prefix Set the User-Agent to include the APN prefix for Azure backends (azureblob, azurefiles, onelake) to identify rclone as a Microsoft Partner. The User-Agent is now: APN/1.0 rclone/1.0 rclone/ --- backend/azureblob/auth/auth.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/azureblob/auth/auth.go b/backend/azureblob/auth/auth.go index b1e365dec..bbea6a4fb 100644 --- a/backend/azureblob/auth/auth.go +++ b/backend/azureblob/auth/auth.go @@ -9,6 +9,7 @@ import ( "net/http" "net/url" "os" + "strings" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" @@ -283,6 +284,9 @@ type transporter struct { // Make a new transporter func newTransporter(ctx context.Context) transporter { + // Set the User-Agent to include the Microsoft Partner Network prefix + ctx, ci := fs.AddConfig(ctx) + ci.UserAgent = "APN/1.0 rclone/1.0 rclone/" + strings.TrimPrefix(fs.Version, "v") return transporter{ RoundTripper: fshttp.NewTransport(ctx), }