Skip to content

Commit 23098a4

Browse files
Merge pull request #49708 from dotnet/main
Merge main into live
2 parents 3d049d1 + ea11cd2 commit 23098a4

File tree

16 files changed

+40
-185
lines changed

16 files changed

+40
-185
lines changed

docs/azure/includes/dotnet-all.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@
116116
| Text Translation | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Translation.Text/1.0.0) | [docs](/dotnet/api/overview/azure/AI.Translation.Text-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Translation.Text_1.0.0/sdk/translation/Azure.AI.Translation.Text/) |
117117
| Time Series Insights | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.IoT.TimeSeriesInsights/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/IoT.TimeSeriesInsights-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.IoT.TimeSeriesInsights_1.0.0-beta.1/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/) |
118118
| TimeZone | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Maps.TimeZones/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Maps.TimeZones-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Maps.TimeZones_1.0.0-beta.1/sdk/maps/Azure.Maps.TimeZones/) |
119+
| unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.AI.AgentServer.Contracts/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.AgentServer.Contracts_1.0.0-beta.1/sdk/agentserver/Azure.AI.AgentServer.Contracts/) |
120+
| unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.AI.AgentServer.Core/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.AgentServer.Core_1.0.0-beta.1/sdk/agentserver/Azure.AI.AgentServer.Core/) |
119121
| Vision Common | NuGet [0.15.1-beta.1](https://www.nuget.org/packages/Azure.AI.Vision.Common/0.15.1-beta.1) | | GitHub [0.15.1-beta.1](https://msasg.visualstudio.com/Skyman/_git/Carbon) |
120122
| Voice Live | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.VoiceLive/1.0.0) | [docs](/dotnet/api/overview/azure/AI.VoiceLive-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.VoiceLive_1.0.0/sdk/ai/Azure.AI.VoiceLive/) |
121123
| WCF Storage Queues | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.WCF.Azure.StorageQueues/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.WCF.Azure.StorageQueues-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.WCF.Azure.StorageQueues_1.0.0-beta.1/sdk/extension-wcf/Microsoft.WCF.Azure.StorageQueues/) |
@@ -264,7 +266,6 @@
264266
| Resource Management - Hardware Security Modules | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.HardwareSecurityModules/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HardwareSecurityModules-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HardwareSecurityModules_1.0.0/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/) |
265267
| Resource Management - Hci.Vm | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Hci.Vm/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Hci.Vm-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Hci.Vm_1.0.0-beta.1/sdk/azurestackhci/Azure.ResourceManager.Hci.Vm/) |
266268
| Resource Management - HDInsight | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight/1.1.0)<br>NuGet [1.2.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight/1.2.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.HDInsight-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight_1.1.0/sdk/hdinsight/Azure.ResourceManager.HDInsight/)<br>GitHub [1.2.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight_1.2.0-beta.5/sdk/hdinsight/Azure.ResourceManager.HDInsight/) |
267-
| Resource Management - HDInsight Containers | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight.Containers/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.HDInsight.Containers-readme?view=azure-dotnet-preview&amp;preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight.Containers_1.0.0-beta.5/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/) |
268269
| Resource Management - Health Bot | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.HealthBot/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthBot-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthBot_1.2.0/sdk/healthbot/Azure.ResourceManager.HealthBot/) |
269270
| Resource Management - Health Data AI Services | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.HealthDataAIServices/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthDataAIServices-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthDataAIServices_1.0.0/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/) |
270271
| Resource Management - Healthcare APIs | NuGet [1.3.1](https://www.nuget.org/packages/Azure.ResourceManager.HealthcareApis/1.3.1) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthcareApis-readme) | GitHub [1.3.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthcareApis_1.3.1/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/) |
@@ -536,8 +537,8 @@
536537
| Functions extension for Azure SQL and SQL Server | NuGet [3.1.527](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Sql/3.1.527) | | |
537538
| Functions extension for Cosmos DB | NuGet [4.11.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.CosmosDB/4.11.0)<br>NuGet [4.12.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.CosmosDB/4.12.0-preview.1) | | GitHub [4.11.0](https://github.com/Azure/azure-webjobs-sdk-extensions/tree/cosmos-v3.0.7/src/WebJobs.Extensions.CosmosDB) |
538539
| Functions extension for DocumentDB | NuGet [1.3.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.DocumentDB/1.3.0) | | GitHub [1.3.0](https://github.com/Azure/azure-webjobs-sdk-extensions) |
539-
| Functions extension for Durable Task Framework | NuGet [3.6.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.DurableTask/3.6.0) | [docs](/dotnet/api/overview/azure/functions) | GitHub [3.6.0](https://github.com/Azure/azure-functions-durable-extension/tree/v2.2.2/src/WebJobs.Extensions.DurableTask) |
540-
| Functions extension for Durable Task Framework - isolated worker | NuGet [1.9.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.DurableTask/1.9.0) | | |
540+
| Functions extension for Durable Task Framework | NuGet [3.7.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.DurableTask/3.7.0) | [docs](/dotnet/api/overview/azure/functions) | GitHub [3.7.0](https://github.com/Azure/azure-functions-durable-extension/tree/v2.2.2/src/WebJobs.Extensions.DurableTask) |
541+
| Functions extension for Durable Task Framework - isolated worker | NuGet [1.10.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.DurableTask/1.10.0) | | |
541542
| Functions extension for HTTP | NuGet [3.2.1](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Http/3.2.1) | | GitHub [3.2.1](https://github.com/Azure/azure-webjobs-sdk-extensions/tree/v3.0.2/src/WebJobs.Extensions.Http) |
542543
| Functions extension for IoT Edge | NuGet [1.0.7](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.EdgeHub/1.0.7) | | GitHub [1.0.7](https://github.com/Azure/iotedge/tree/1.0.7/edge-hub) |
543544
| Functions extension for Kafka | NuGet [4.2.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Kafka/4.2.0) | | GitHub [4.2.0](https://github.com/Azure/azure-functions-kafka-extension/tree/3.0.0/src/Microsoft.Azure.WebJobs.Extensions.Kafka) |

docs/azure/includes/dotnet-new.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@
124124
| Text Translation | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Translation.Text/1.0.0) | [docs](/dotnet/api/overview/azure/AI.Translation.Text-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Translation.Text_1.0.0/sdk/translation/Azure.AI.Translation.Text/) |
125125
| Time Series Insights | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.IoT.TimeSeriesInsights/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/IoT.TimeSeriesInsights-readme?view=azure-dotnet-preview&amp;preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.IoT.TimeSeriesInsights_1.0.0-beta.1/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/) |
126126
| TimeZone | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Maps.TimeZones/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Maps.TimeZones-readme?view=azure-dotnet-preview&amp;preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Maps.TimeZones_1.0.0-beta.1/sdk/maps/Azure.Maps.TimeZones/) |
127+
| unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.AI.AgentServer.Contracts/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.AgentServer.Contracts_1.0.0-beta.1/sdk/agentserver/Azure.AI.AgentServer.Contracts/) |
128+
| unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.AI.AgentServer.Core/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.AgentServer.Core_1.0.0-beta.1/sdk/agentserver/Azure.AI.AgentServer.Core/) |
127129
| Video Analyzer Edge | NuGet [1.0.0-beta.6](https://www.nuget.org/packages/Azure.Media.VideoAnalyzer.Edge/1.0.0-beta.6) | [docs](/dotnet/api/overview/azure/Media.VideoAnalyzer.Edge-readme?view=azure-dotnet-preview&amp;preserve-view=true) | GitHub [1.0.0-beta.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Media.VideoAnalyzer.Edge_1.0.0-beta.6/sdk/videoanalyzer/Azure.Media.VideoAnalyzer.Edge/) |
128130
| Vision Common | NuGet [0.15.1-beta.1](https://www.nuget.org/packages/Azure.AI.Vision.Common/0.15.1-beta.1) | | GitHub [0.15.1-beta.1](https://msasg.visualstudio.com/Skyman/_git/Carbon) |
129131
| Voice Live | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.VoiceLive/1.0.0) | [docs](/dotnet/api/overview/azure/AI.VoiceLive-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.VoiceLive_1.0.0/sdk/ai/Azure.AI.VoiceLive/) |

docs/azure/sdk/authentication/system-assigned-managed-identity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Authenticate Azure-hosted .NET apps to Azure resources using a system-ass
33
description: Learn how to authenticate Azure-hosted .NET apps to other Azure services using a system-assigned managed identity.
44
ms.topic: how-to
55
ms.custom: devx-track-dotnet, engagement-fy23, devx-track-azurecli
6-
ms.date: 02/06/2025
6+
ms.date: 11/10/2025
77
---
88

99
# Authenticate Azure-hosted .NET apps to Azure resources using a system-assigned managed identity

docs/azure/sdk/includes/implement-system-assigned-identity.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
ms.topic: include
3-
ms.date: 02/12/2025
3+
ms.date: 11/10/2025
44
---
55

66
[!INCLUDE [implement-managed-identity-concepts](implement-managed-identity-concepts.md)]
@@ -30,19 +30,10 @@ Azure services are accessed using specialized client classes from the various Az
3030

3131
1. Include the `Azure.Identity` and `Microsoft.Extensions.Azure` namespaces via `using` directives.
3232
1. Register the Azure service client using the corresponding `Add`-prefixed extension method.
33-
1. Pass an appropriate `TokenCredential` instance to the `UseCredential` method:
34-
- Use `DefaultAzureCredential` when your app is running locally.
35-
- Use `ManagedIdentityCredential` when your app is running in Azure.
33+
1. Use an appropriate `TokenCredential` instance for the environment in which your app is running. When your app is running:
34+
- In Azure, pass an instance of `ManagedIdentityCredential` to the `UseCredential` method. `ManagedIdentityCredential` discovers your managed identity configurations to authenticate to other services automatically.
35+
- On your local development machine, an instance of `DefaultAzureCredential` is created on your behalf. Call `UseCredential` only if you want to [customize `DefaultAzureCredential`](../authentication/credential-chains.md#how-to-customize-defaultazurecredential) or use a different credential. `DefaultAzureCredential` looks in the environment variables for an application service principal or at locally installed developer tools, such as Visual Studio, for a set of developer credentials.
3636

3737
:::code language="csharp" source="../snippets/authentication/system-assigned-managed-identity/Program.cs" id="snippet_MIC_UseCredential":::
3838

39-
An alternative to the `UseCredential` method is to provide the credential to the service client directly:
40-
41-
:::code language="csharp" source="../snippets/authentication/system-assigned-managed-identity/Program.cs" id="snippet_MIC":::
42-
4339
---
44-
45-
The preceding code behaves differently depending on the environment where it's running:
46-
47-
- On your local development workstation, `DefaultAzureCredential` looks in the environment variables for an application service principal or at locally installed developer tools, such as Visual Studio, for a set of developer credentials.
48-
- When deployed to Azure, `ManagedIdentityCredential` discovers your managed identity configurations to authenticate to other services automatically.

docs/azure/sdk/includes/implement-user-assigned-identity.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
ms.topic: include
3-
ms.date: 02/12/2025
3+
ms.date: 11/10/2025
44
---
55

66
[!INCLUDE [implement-managed-identity-concepts](implement-managed-identity-concepts.md)]
@@ -30,9 +30,9 @@ Azure services are accessed using specialized client classes from the various Az
3030

3131
1. Include the `Azure.Identity` and `Microsoft.Extensions.Azure` namespaces via `using` directives.
3232
1. Register the Azure service client using the corresponding `Add`-prefixed extension method.
33-
1. Pass an appropriate `TokenCredential` instance to the `UseCredential` method:
34-
- Use `DefaultAzureCredential` when your app is running locally
35-
- Use `ManagedIdentityCredential` when your app is running in Azure and configure either the client ID, resource ID, or object ID.
33+
1. Use an appropriate `TokenCredential` instance for the environment in which your app is running. When your app is running:
34+
- In Azure, pass an instance of `ManagedIdentityCredential` to the `UseCredential` method and configure either the client ID, resource ID, or object ID. `ManagedIdentityCredential` discovers your managed identity configurations to authenticate to other services automatically.
35+
- On your local development machine, an instance of `DefaultAzureCredential` is created on your behalf. Call `UseCredential` only if you want to [customize `DefaultAzureCredential`](../authentication/credential-chains.md#how-to-customize-defaultazurecredential) or use a different credential. `DefaultAzureCredential` looks in the environment variables for an application service principal or at locally installed developer tools, such as Visual Studio, for a set of developer credentials.
3636

3737
## [Client ID](#tab/client-id)
3838

@@ -51,10 +51,6 @@ The client ID is used to identify a managed identity when configuring applicatio
5151
5252
:::code language="csharp" source="../snippets/authentication/user-assigned-managed-identity/Program.cs" id="snippet_MIC_ClientId_UseCredential":::
5353
54-
An alternative to the `UseCredential` method is to provide the credential to the service client directly:
55-
56-
:::code language="csharp" source="../snippets/authentication/user-assigned-managed-identity/Program.cs" id="snippet_MIC_ClientId":::
57-
5854
## [Resource ID](#tab/resource-id)
5955
6056
The resource ID uniquely identifies the managed identity resource within your Azure subscription using the following structure:
@@ -76,10 +72,6 @@ Resource IDs can be built by convention, which makes them more convenient when w
7672
7773
:::code language="csharp" source="../snippets/authentication/user-assigned-managed-identity/Program.cs" id="snippet_MIC_ResourceId_UseCredential":::
7874
79-
An alternative to the `UseCredential` method is to provide the credential to the service client directly:
80-
81-
:::code language="csharp" source="../snippets/authentication/user-assigned-managed-identity/Program.cs" id="snippet_MIC_ResourceId":::
82-
8375
## [Object ID](#tab/object-id)
8476
8577
A principal ID is another name for an object ID.
@@ -97,13 +89,4 @@ A principal ID is another name for an object ID.
9789
9890
:::code language="csharp" source="../snippets/authentication/user-assigned-managed-identity/Program.cs" id="snippet_MIC_ObjectId_UseCredential":::
9991
100-
An alternative to the `UseCredential` method is to provide the credential to the service client directly:
101-
102-
:::code language="csharp" source="../snippets/authentication/user-assigned-managed-identity/Program.cs" id="snippet_MIC_ObjectId":::
103-
10492
---
105-
106-
The preceding code behaves differently depending on the environment where it's running:
107-
108-
- On your local development workstation, `DefaultAzureCredential` looks in the environment variables for an application service principal or at locally installed developer tools, such as Visual Studio, for a set of developer credentials.
109-
- When deployed to Azure, `ManagedIdentityCredential` discovers your managed identity configurations to authenticate to other services automatically.
Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
using Azure.Identity;
22
using Microsoft.Extensions.Azure;
3-
using Azure.Storage.Blobs;
4-
using Azure.Core;
53

64
var builder = WebApplication.CreateBuilder(args);
75

@@ -11,42 +9,15 @@
119
clientBuilder.AddBlobServiceClient(
1210
new Uri("https://<account-name>.blob.core.windows.net"));
1311

14-
TokenCredential credential = null;
15-
16-
if (builder.Environment.IsProduction())
12+
if (builder.Environment.IsProduction() || builder.Environment.IsStaging())
1713
{
1814
// Managed identity token credential discovered when running in Azure environments
19-
credential = new ManagedIdentityCredential();
20-
}
21-
else
22-
{
23-
// Running locally on dev machine - DO NOT use in production or outside of local dev
24-
credential = new DefaultAzureCredential();
15+
ManagedIdentityCredential credential = new(ManagedIdentityId.SystemAssigned);
16+
clientBuilder.UseCredential(credential);
2517
}
26-
27-
clientBuilder.UseCredential(credential);
2818
});
2919
#endregion snippet_MIC_UseCredential
3020

31-
#region snippet_MIC
32-
TokenCredential credential = null;
33-
34-
if (builder.Environment.IsProduction() || builder.Environment.IsStaging())
35-
{
36-
// Managed identity token credential discovered when running in Azure environments
37-
credential = new ManagedIdentityCredential();
38-
}
39-
else
40-
{
41-
// Running locally on dev machine - DO NOT use in production or outside of local dev
42-
credential = new DefaultAzureCredential();
43-
}
44-
45-
builder.Services.AddSingleton<BlobServiceClient>(_ =>
46-
new BlobServiceClient(
47-
new Uri("https://<account-name>.blob.core.windows.net"), credential));
48-
#endregion snippet_MIC
49-
5021
var app = builder.Build();
5122

5223
if (app.Environment.IsDevelopment())
@@ -82,4 +53,4 @@
8253
internal record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary)
8354
{
8455
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
85-
}
56+
}

0 commit comments

Comments
 (0)