Skip to content

Commit feced96

Browse files
LavanyaK235kalavanyCopilot
authored
Fixing the scope for bot endpoint (#132)
* Fixing the scope for bot endpoint * Update src/Microsoft.Agents.A365.DevTools.Cli/Helpers/ProjectSettingsSyncHelper.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/Microsoft.Agents.A365.DevTools.Cli/Helpers/ProjectSettingsSyncHelper.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Lavanya Kappagantu <kalavany@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ea33b41 commit feced96

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/Microsoft.Agents.A365.DevTools.Cli/Helpers/ProjectSettingsSyncHelper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ public static class ProjectSettingsSyncHelper
2121
{
2222
private const string DEFAULT_AUTHORITY_ENDPOINT = "https://login.microsoftonline.com";
2323
private const string DEFAULT_USER_AUTHORIZATION_SCOPE = "https://graph.microsoft.com/.default";
24-
private const string DEFAULT_SERVICE_CONNECTION_SCOPE = "https://api.botframework.com/.default";
24+
// Messaging Bot API Application GUID
25+
private const string DEFAULT_SERVICE_CONNECTION_SCOPE = $"{ConfigConstants.MessagingBotApiAppId}/.default";
2526

2627
public static async Task ExecuteAsync(
2728
string a365ConfigPath,

src/Tests/Microsoft.Agents.A365.DevTools.Cli.Tests/Helpers/ProjectSettingsSyncHelperTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public async Task ExecuteAsync_DotNet_WritesExpectedAppsettings()
126126
Assert.Equal(cfg.AgentBlueprintClientSecret, svcSettings["ClientSecret"]!.GetValue<string>());
127127
var svcScopes = svcSettings["Scopes"]!.AsArray();
128128
Assert.Single(svcScopes);
129-
Assert.Equal("https://api.botframework.com/.default", svcScopes[0]!.GetValue<string>());
129+
Assert.Equal("5a807f24-c9de-44ee-a3a7-329e88a00ffc/.default", svcScopes[0]!.GetValue<string>());
130130

131131
// ConnectionsMap
132132
var connectionsMap = j["ConnectionsMap"]!.AsArray();

0 commit comments

Comments
 (0)