Soenneker.Azure.Utils.ArmClientUtil 4.0.435

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Azure.Utils.ArmClientUtil --version 4.0.435
                    
NuGet\Install-Package Soenneker.Azure.Utils.ArmClientUtil -Version 4.0.435
                    
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="Soenneker.Azure.Utils.ArmClientUtil" Version="4.0.435" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Azure.Utils.ArmClientUtil" Version="4.0.435" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Azure.Utils.ArmClientUtil" />
                    
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 Soenneker.Azure.Utils.ArmClientUtil --version 4.0.435
                    
#r "nuget: Soenneker.Azure.Utils.ArmClientUtil, 4.0.435"
                    
#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 Soenneker.Azure.Utils.ArmClientUtil@4.0.435
                    
#: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=Soenneker.Azure.Utils.ArmClientUtil&version=4.0.435
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Azure.Utils.ArmClientUtil&version=4.0.435
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Azure.Utils.ArmClientUtil

Creates and caches an Azure Resource Manager ArmClient authenticated with a service-principal client secret.

Installation

dotnet add package Soenneker.Azure.Utils.ArmClientUtil

Configuration

{
  "Azure": {
    "TenantId": "tenant-guid",
    "AppRegistration": {
      "Id": "application-client-id",
      "Secret": "client-secret"
    }
  }
}

Store the secret in Azure Key Vault, an environment variable, or another secret provider. Assign the service principal only the Azure RBAC roles its callers need.

Registration and use

using Azure.ResourceManager;
using Azure.ResourceManager.Resources;
using Soenneker.Azure.Utils.ArmClientUtil.Abstract;
using Soenneker.Azure.Utils.ArmClientUtil.Registrars;

builder.Services.AddArmClientUtilAsSingleton();

public sealed class SubscriptionReader(IArmClientUtil armClientUtil)
{
    public async Task<List<string>> GetSubscriptionNames(
        CancellationToken cancellationToken)
    {
        ArmClient client = await armClientUtil.Get(cancellationToken);
        var names = new List<string>();

        await foreach (SubscriptionResource subscription in
            client.GetSubscriptions().GetAllAsync(cancellationToken))
        {
            names.Add(subscription.Data.DisplayName);
        }

        return names;
    }
}

Lifecycle and authentication behavior

  • The ArmClient is created on first use and reused afterward.
  • Missing tenant, client ID, or secret configuration fails initialization.
  • Configuration and secret rotation do not alter an initialized client; replace the utility instance to use new credentials.
  • Azure authorization is evaluated by ARM for each resource operation. Possessing a valid client secret does not grant access without the corresponding RBAC assignment.
  • Let DI dispose the utility.

This package specifically uses ClientSecretCredential. Workloads that can use managed identity or workload identity should construct ArmClient with the appropriate TokenCredential instead of storing a client secret.

Product Compatible and additional computed target framework versions.
.NET 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 (1)

Showing the top 1 NuGet packages that depend on Soenneker.Azure.Utils.ArmClientUtil:

Package Downloads
Soenneker.Nubilus.Azure.Cosmos

Resolves existing Azure Cosmos DB accounts through Azure Resource Manager.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.456 109 11/18/2026
11.0.454 97 11/18/2026
11.0.451 113 11/11/2026
11.0.444 163 10/27/2026
11.0.443 124 10/27/2026
11.0.442 113 10/26/2026
11.0.441 111 10/26/2026
11.0.440 103 10/26/2026
11.0.439 103 10/26/2026
11.0.438 110 10/26/2026
4.0.437 110 10/26/2026
4.0.436 97 10/25/2026
4.0.435 94 10/25/2026
4.0.434 562 10/15/2026
4.0.433 116 10/14/2026
4.0.432 106 10/14/2026
4.0.431 123 10/14/2026
4.0.429 99 10/14/2026
4.0.428 121 10/14/2026
4.0.427 99 10/14/2026
Loading failed

Update dependency Microsoft.Extensions.Configuration.Abstractions to 10.0.14 (#1032)