diff --git a/samples/dotnet/GenesysHandoff/GenesysHandoffAgent.cs b/samples/dotnet/GenesysHandoff/GenesysHandoffAgent.cs index badb2804..429d056e 100644 --- a/samples/dotnet/GenesysHandoff/GenesysHandoffAgent.cs +++ b/samples/dotnet/GenesysHandoff/GenesysHandoffAgent.cs @@ -38,7 +38,7 @@ public GenesysHandoffAgent(AgentApplicationOptions options, IHttpClientFactory h _genesysService = genesysService; OnMessage("-reset", HandleResetMessage); OnMessage("-signout", HandleSignOut); - OnActivity((turnContext, cancellationToken) => Task.FromResult(true), HandleAllActivities, autoSignInHandlers: ["mcs"]); + OnActivity((turnContext, cancellationToken) => Task.FromResult(true), HandleAllActivities); UserAuthorization.OnUserSignInFailure(async (turnContext, turnState, handlerName, response, initiatingActivity, cancellationToken) => { await turnContext.SendActivityAsync($"SignIn failed with '{handlerName}': {response.Cause}/{response.Error!.Message}", cancellationToken: cancellationToken); diff --git a/samples/dotnet/GenesysHandoff/appManifest/manifest.json b/samples/dotnet/GenesysHandoff/appManifest/manifest.json index 84d5042b..2005851c 100644 --- a/samples/dotnet/GenesysHandoff/appManifest/manifest.json +++ b/samples/dotnet/GenesysHandoff/appManifest/manifest.json @@ -14,12 +14,12 @@ "outline": "outline.png" }, "name": { - "short": "User Authorization (OAuth+OBO)", - "full": "User Authorization (OAuth+OBO)" + "short": "GenesysHandoffAgent", + "full": "GenesysHandoffAgent" }, "description": { - "short": "Sample demonstrating Azure Bot Services user authorization with using a Agent.", - "full": "This sample demonstrates how to integrate with Microsoft Copilot Studio using OBO and CopilotStudioClient." + "short": "Genesys Handoff", + "full": "Integrating Genesys Handoff functionality within a Microsoft Copilot Studio agent." }, "accentColor": "#FFFFFF", "copilotAgents": { diff --git a/samples/dotnet/GenesysHandoff/appsettings.json b/samples/dotnet/GenesysHandoff/appsettings.json index 99007efa..aded6e60 100644 --- a/samples/dotnet/GenesysHandoff/appsettings.json +++ b/samples/dotnet/GenesysHandoff/appsettings.json @@ -1,6 +1,6 @@ { "TokenValidation": { - "Enabled": true, + "Enabled": false, "Audiences": [ "{{ClientID}}" ], diff --git a/samples/dotnet/obo-authorization/Program.cs b/samples/dotnet/obo-authorization/Program.cs index 63442a19..3c30aec3 100644 --- a/samples/dotnet/obo-authorization/Program.cs +++ b/samples/dotnet/obo-authorization/Program.cs @@ -67,11 +67,9 @@ CopilotClient GetClient(AgentApplication app, ITurnContext turnContext) // Since Auto SignIn is enabled, by the time this is called the token is already available via UserAuthorization.GetTurnTokenAsync or // UserAuthorization.ExchangeTurnTokenAsync. - // NOTE: This is a slightly unusual way to handle incoming Activities (but perfectly) valid. For this sample, - // we just want to proxy messages to/from a Copilot Studio Agent. + // For this sample we just want to proxy messages to a Copilot Studio Agent. app.OnActivity((turnContext, cancellationToken) => Task.FromResult(true), async (turnContext, turnState, cancellationToken) => { - var mcsConversationId = turnState.Conversation.GetValue(MCSConversationPropertyName); var cpsClient = GetClient(app, turnContext); @@ -100,7 +98,7 @@ CopilotClient GetClient(AgentApplication app, ITurnContext turnContext) } } } - }, autoSignInHandlers: ["mcs"]); + }); // Called when the OAuth flow fails app.UserAuthorization.OnUserSignInFailure(async (turnContext, turnState, handlerName, response, initiatingActivity, cancellationToken) => diff --git a/samples/dotnet/obo-authorization/appsettings.json b/samples/dotnet/obo-authorization/appsettings.json index 25717d57..03fa5332 100644 --- a/samples/dotnet/obo-authorization/appsettings.json +++ b/samples/dotnet/obo-authorization/appsettings.json @@ -14,6 +14,7 @@ "UserAuthorization": { "AutoSignIn": true, + "DefaultHandlerName": "mcs", "Handlers": { "mcs": { "Settings": {