How to Integrate your live SAP HR Data into M365 Copilot - Part 1
Tags: sap, ai, githubcopilot, m365
Published: 2024-05-25 17:20:14

---
title: How to Integrate your live SAP HR Data into M365 Copilot - Part 1
published: true
date: 2024-05-25 11:00:00 UTC
tags: SAP,AI, copilot, m365
canonical_url: https://blog.bajonczak.com/how-to-integrate-you-sap-data-into-you-ai-model/
---

 ![How to Integrate your live SAP HR Data into M365 Copilot - Part 1](https://blog.bajonczak.com/content/images/2024/05/Blog-Image.svg) here is only the half of the article available. 

Actually, there is no other word so popular as AI! On each Keynote, Conference, Talk, and so on I hear the same about this. So I tried to investigate some Usecases for me.

Sure you can read about this in my last posts about this topic. But now I want a business use case for now.

But before I start, let's make it clear. I will divide this article into more than one post. Why? Because it is a complex topic. It's hard to write down at once. But I try to write it clearly enough to follow. At the end of this series (of a maximum of 3 posts). You will get the complete source code to create your own copilot extension.

# The use case

So let's assume we have a list of employees who will work for a company as a consultant. So to get some work, the easiest way is to offer the consultants knowledge to a project on a project portal like gulp or s.th.

You can do this manually, but that takes more effort if your team will increase the amount of employees. So an AI solution is something like this:

1. The salesman will take the offer
2. It will ask the copilot for suggestions for employees
3. Copilot will look into the SAP HCM for possible employees
4. Copilot will send you a list of names with a matching score
5. Also it will gather a CV to send to

So let's get started

# How Microsoft Office 365 Copilot works

Before we can start, it is necessary to get an overview of how the Microsoft Copilot works.

![How to Integrate your live SAP HR Data into M365 Copilot - Part 1](https://learn.microsoft.com/de-de/microsoft-365-copilot/extensibility/assets/images/copilot-system-flow.png)
_Source: https://learn.microsoft.com/de-de/microsoft-365-copilot/extensibility/ecosystem_

The first step is the Microsoft 365 copilot will be triggered via a command like "Hey! Where is the Order for Customer X?". The next step is that Copilot uses the graph API for using the pre-processing. It will look there for the data that will be required for the answer. (Please note, that it will only be the data that is only accessible for you!). Also, this process will combined with a grounding of the data. The data result will be sent to the Large Language Model (LLM). This LLM will analyze the incoming data, wire the single sources together, and try to combine the data (like customers and orders) in a semantic way. This will be sent back to the copilot and will do a post-processing or enrich additional data. At least it will result in the data back to the copilot and sending it to the caller itself.

So Copilot can have as a source not only the Microsoft Graph, in the picture below you see that you can have several data sources.

![How to Integrate your live SAP HR Data into M365 Copilot - Part 1](https://learn.microsoft.com/de-de/microsoft-365-copilot/extensibility/assets/images/copilot-system.png)
_source: https://learn.microsoft.com/de-de/microsoft-365-copilot/extensibility/_

# The Idea

So hey we now can try to identify which solution fits for us, but luckily Microsoft published a nice helper diagram to get the right choice of extension.

![How to Integrate your live SAP HR Data into M365 Copilot - Part 1](https://learn.microsoft.com/en-us/microsoft-365-copilot/extensibility/assets/images/skills-knowledge-chart.png)
_source: https://learn.microsoft.com/de-de/microsoft-365-copilot/extensibility/_

In my case, I use a plugin. The knowledge will be available in the SAP System, so I need a skilled extension. For this, the diagram tells me that I need a Plugin. So we need a Plugin for Teams.

# Install Prerequisites

Before we can start, we need some requirements

- [Visual Studio Code](https://code.visualstudio.com/Download?ref=blog.bajonczak.com)  
This will be your IDE. If you don't have it. Go get it! ;)
- [Teams](name:%20Teams%20Toolkit%20Id:%20TeamsDevApp.ms-teams-vscode-extension%20Description:%20Create,%20debug,%20and%20deploy%20Teams%20apps%20with%20Teams%20Toolkit%20Version:%205.8.0%20Publisher:%20Microsoft%20VS%20Marketplace%20Link:%20https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension)Toolkit  
This Visual Studio Code extension will allow you to create an extension (in various ways) for your Teams. **Please note that you must use the prerelease version**.
- Fun  
Yep, you need some fun ;)