-
Notifications
You must be signed in to change notification settings - Fork 36
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
Open
svandenhoven
wants to merge
12
commits into
microsoft:main
Choose a base branch
from
svandenhoven:sandervd/webclientsample
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Adding Copilot Studio Client API and SPA Sample #59
svandenhoven
wants to merge
12
commits into
microsoft:main
from
svandenhoven:sandervd/webclientsample
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…hoven/Agents-for-net into sandervd/webclientsample
MattB-msft
reviewed
Jan 23, 2025
...s/copilot_studio_client_api_and_spa/CopilotStudioClientSampleAPI/SampleConnectionSettings.cs
Outdated
Show resolved
Hide resolved
...les/copilot_studio_client_api_and_spa/CopilotStudioClientSampleAPI/.config/dotnet-tools.json
Outdated
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.