Based on Semantic Kernel's Authenticated API Sample, this subfolder contains a sample that demonstrates how to use Semantic Kernel to connect to the Microsoft Graph using your personal account. It highlights Open ID Connect (OIDC) authentication and calling APIs for MS Graph to personalize the user experience.
- Node.js (v14.17.0 or later)
- Yarn (v1.22.10 or later)
- Open AI Key or Azure Open AI Service key
- Semantic Kernel HTTP Server
- Copy the
.env.example
file to.env
and fill in the values for the missing keys. - Ensure Semantic Kernel's service API is already running
http://localhost:7071
. - For MS Graph,
register your application
. Follow the steps to register your app
here.
- Select
Single-page application (SPA)
as platform type, and the Redirect URI will behttp://localhost:3000
- It is recommended you use the
Personal Microsoft accounts
account type for this sample.
- Select
- Once registered, copy the Application (client) ID from the Azure Portal and paste
the GUID into the .env file next to
REACT_APP_GRAPH_CLIENT_ID=
(first line of the .env file). - Run the following command
yarn install
(if you have never run the sample before) and/oryarn start
from the command line. - A browser will automatically open, otherwise you can navigate to
http://localhost:3000
to use the sample.