-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Copilot Studio Client API and SPA Sample #59
base: main
Are you sure you want to change the base?
Adding Copilot Studio Client API and SPA Sample #59
Conversation
…hoven/Agents-for-net into sandervd/webclientsample
@@ -16,6 +16,10 @@ | |||
<Microsoft_AspNetCore_PkgVer>8.0.11</Microsoft_AspNetCore_PkgVer> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.11" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the Microsoft_AspNetCore_PkgVer variable for the version of Asp.net
/// <summary> | ||
/// Connection Settings extension for the sample to include appID and TeantId for creating authentication token. | ||
/// </summary> | ||
internal class SampleConnectionSettings : ConnectionSettings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason you included this?
if your doing token exchange within a given tenant you do not need this you can use the base settings and drop Tenant ID and Application ID, using the tenant and application id of the host site for the OBO exchange.
@@ -0,0 +1,13 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see any build changes, any reason this is here? it will not get restored during build.
Description
The Copilot Studio Client API and SPA Sample is an example application that demonstrates how a user can log in with their Entra ID account on a Single Page Application (SPA) built with React. This application utilizes a .NET API that leverages the Microsoft 365 Agents SDK. Through this setup, the API can interact with any Copilot Studio Agent, enabling the creation of conversations that can be accessed via a React SPA.
Architecture
To Test
See in the README.md in folder "copilot_studio_client_api_and_spa" how to configure the sample to test it.
Changes
This pull request introduces a new sample API project,
CopilotStudioClientSampleAPI
, which integrates with Microsoft Copilot Studio. The changes include adding new package dependencies, updating the solution file, and implementing the API's functionality.New Sample API Project:
Project Setup and Dependencies:
Directory.Packages.props
forMicrosoft.AspNetCore.Authentication.OpenIdConnect
,Microsoft.Identity.Web
,Microsoft.Identity.Web.DownstreamApi
, andSwashbuckle.AspNetCore
.CopilotStudioClientSampleAPI.csproj
with references to necessary packages and project dependencies.dotnet-tools.json
to manage .NET tools for the project.Solution Configuration:
Microsoft.Agents.SDK.sln
to include the newCopilotStudioClientSampleAPI
project. [1] [2] [3]API Implementation:
Chat
controller inControllers/Chat.cs
to handle chat interactions with Copilot Studio.Conversation
,ChatResponse
,MessageRequest
, andContent
inModels/ChatResponse.cs
to structure API responses and requests.Program.cs
to set up services, authentication, and CORS policy.Documentation and Configuration:
README.md
file outlining the project architecture, setup instructions, and configuration details.CopilotStudioClientSampleAPI.http
for testing the API endpoints.