Skip to content

[Do not merge] Example using the Graph API to send email and save notes #2515

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

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

pamelafox
Copy link
Collaborator

Purpose

This PR is simply a demonstration of how it is possible to use the access token and on-behalf-of-flow to take actions in the user's 365 account, saving notes in OneNote and sending emails.

Example flow:

Screenshot 2025-04-29 at 6 46 47 AM Screenshot 2025-04-29 at 6 46 30 AM

Does this introduce a breaking change?

When developers merge from main and run the server, azd up, or azd deploy, will this produce an error?
If you're not sure, try it out on an old environment.

[ ] Yes
[X] No

Does this require changes to learn.microsoft.com docs?

This repository is referenced by this tutorial
which includes deployment, settings and usage instructions. If text or screenshot need to change in the tutorial,
check the box below and notify the tutorial author. A Microsoft employee can do this for you if you're an external contributor.

[ ] Yes
[X] No

Type of change

[ ] Bugfix
[X] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

Code quality checklist

See CONTRIBUTING.md for more details.

  • The current tests all pass (python -m pytest).
  • I added tests that prove my fix is effective or that my feature works
  • I ran python -m pytest --cov to verify 100% coverage of added lines
  • I ran python -m mypy to check for type errors
  • I either used the pre-commit hooks or ran ruff and black manually on my code.

@pamelafox pamelafox marked this pull request as draft April 29, 2025 13:47
@cforce
Copy link
Contributor

cforce commented Apr 29, 2025

I would be nice to extend the architecture for plug gable tools like MCP does. The adding tools like email, one note, etc could be plugging and by feature flag. This will make the demo solid and even apply more a product usable polish

@pamelafox
Copy link
Collaborator Author

Yeah, I'm thinking we may port to openai-agents, as it's got a fairly lightweight approach to tools usage that would cover most of our use cases. But we also need to consider Semantic Kernel as that has good Azure integration.

@cforce
Copy link
Contributor

cforce commented May 1, 2025

We can use MCP and still Semantic Kernel under the hood

– An MCP client is created.
– MCP Client is downloading MCP server implementation, in the shape of an npx package.
– Which runs it locally as a process, acting as a host of the server.
– once this is done simply use it as a plugin, transparently, from SK.
image
https://github.com/StefH/McpDotNet.Extensions.SemanticKernel
https://devblogs.microsoft.com/semantic-kernel/integrating-model-context-protocol-tools-with-semantic-kernel-a-step-by-step-guide/
@markwallace-microsoft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants