From 3422d0f23fb2be8f5a80a8743b6630711ecb7680 Mon Sep 17 00:00:00 2001 From: Maria Samuel Date: Fri, 13 Mar 2026 11:54:01 -0400 Subject: [PATCH 1/2] Fix for agentic authentication error Only IConfidentialClientApplication is supported for Agentic. --- dotnet/agent-framework/sample-agent/appsettings.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dotnet/agent-framework/sample-agent/appsettings.json b/dotnet/agent-framework/sample-agent/appsettings.json index ea668f2d..5eed2766 100644 --- a/dotnet/agent-framework/sample-agent/appsettings.json +++ b/dotnet/agent-framework/sample-agent/appsettings.json @@ -52,12 +52,14 @@ "Connections": { "ServiceConnection": { "Settings": { - "AuthType": "UserManagedIdentity", // this is the AuthType for the connection, valid values can be found in Microsoft.Agents.Authentication.Msal.Model.AuthTypes. + "AuthType": "ClientSecret", // this is the AuthType for the connection, valid values can be found in Microsoft.Agents.Authentication.Msal.Model.AuthTypes. "AuthorityEndpoint": "https://login.microsoftonline.com/{{BOT_TENANT_ID}}", "ClientId": "{{BOT_ID}}", // this is the BluePrint Client ID used for the connection. "Scopes": [ "5a807f24-c9de-44ee-a3a7-329e88a00ffc/.default" - ] + ], + "ClientSecret": "{{BOT_ID_SECRET}}", + "AgentId": "{{BOT_ID}}" } } }, From 1ce04ee9f15a0fd858ec7ba5b2dfddab42a14fe8 Mon Sep 17 00:00:00 2001 From: Maria Samuel <46797061+mariasamuel@users.noreply.github.com> Date: Fri, 13 Mar 2026 12:04:28 -0400 Subject: [PATCH 2/2] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- dotnet/agent-framework/sample-agent/appsettings.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dotnet/agent-framework/sample-agent/appsettings.json b/dotnet/agent-framework/sample-agent/appsettings.json index 5eed2766..289dea53 100644 --- a/dotnet/agent-framework/sample-agent/appsettings.json +++ b/dotnet/agent-framework/sample-agent/appsettings.json @@ -53,13 +53,13 @@ "ServiceConnection": { "Settings": { "AuthType": "ClientSecret", // this is the AuthType for the connection, valid values can be found in Microsoft.Agents.Authentication.Msal.Model.AuthTypes. - "AuthorityEndpoint": "https://login.microsoftonline.com/{{BOT_TENANT_ID}}", - "ClientId": "{{BOT_ID}}", // this is the BluePrint Client ID used for the connection. + "AuthorityEndpoint": "https://login.microsoftonline.com/{{TenantId}}", + "ClientId": "{{ClientId}}", // this is the BluePrint Client ID used for the connection. "Scopes": [ "5a807f24-c9de-44ee-a3a7-329e88a00ffc/.default" ], - "ClientSecret": "{{BOT_ID_SECRET}}", - "AgentId": "{{BOT_ID}}" + "ClientSecret": "", + "AgentId": "{{ClientId}}" } } },