MicrosoftAzure.Api 2.0.40

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

MicrosoftAzure.Api

Nuget Nuget License: MIT Codacy Badge

A .NET API for Microsoft Azure.

Makes calls to endpoints set out here:

Example usage

using MicrosoftAzure.Api;

var subscriptionId = new Guid("your-subscription-id");
var resourceGroupName = "your-resource-group-name";
var workspaceName = "your-workspace-name";
var workspaceId = getWorkSpaceIdGuid();

var client = new MicrosoftAzureClient(new MicrosoftAzureClientOptions
{
	TenantId = Guid.Parse("your-tenant-id"),
	ClientId = Guid.Parse("your-client-id"),
	ClientSecret = "your-client-secret"
});

var signInLogs = await client
	.LogAnalytics
	.QueryAsync(
		workspaceId,
		new QueryRequest
		{
			Query = "SigninLogs | take 5"
		},
		default)
	.ConfigureAwait(true);

var connectors = await client
	.Sentinel
	.GetConnectorsAsync(
		subscriptionId,
		resourceGroupName,
		workspaceName,
		default)
	.ConfigureAwait(true);
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

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
2.0.46 225 9/13/2026
2.0.40 132 9/3/2026
2.0.30 122 8/28/2026
2.0.27 111 8/28/2026
2.0.16 403 3/28/2026
2.0.14 504 12/18/2025
2.0.11 1,414 8/21/2024
2.0.9 227 8/21/2024
2.0.7 224 8/15/2024
2.0.5 266 5/31/2024
2.0.4 192 5/31/2024
2.0.1 217 5/31/2024
1.0.22 237 5/12/2024
1.0.18 261 4/17/2024
1.0.17 208 4/17/2024

Security fix: sensitive HTTP headers are now redacted in diagnostic output.

Previously the Authorization header, and therefore a usable access token, was written verbatim
into the Debug level request logging emitted by CustomHttpClientHandler. Any consumer running
at Debug retained usable credentials for the life of its log store.

Authorization, Proxy-Authorization, Cookie, Set-Cookie and common API key headers are now
redacted in both request and response headers, along with any vendor-prefixed variant whose
name ends in "Authorization". The authentication scheme and the credential length are
retained, so failures remain diagnosable without exposing the credential.

Consumers should upgrade and then review existing logs for previously captured tokens.