page_type: sample description: This sample demonstrates how to use the Microsoft Graph connector API to create a custom connector that indexes issues and repositories from GitHub. products:
Microsoft Graph connectors let you add your own data to the semantic search index and have it power various Microsoft 365 experiences. This TypeScript application shows you how to use the Microsoft Graph connector API to create a custom connector that indexes issues and repositories from GitHub. This connector sample powers experiences such as Microsoft Search, Copilot in Teams, the Microsoft 365 App, and more.
The Microsoft Graph connector experiences that will be enabled in the sample include:
Go to the Azure Active Directory admin center and sign in with an administrator account.
In the left pane, select Azure Active Directory, and under Manage, select App registrations.
Select New registration.
Complete the Register an application form with the following values, and then select Register.
GitHub Connector
On the GitHub Connector overview page, copy the values of Application (client) ID and Directory (tenant) ID. You will need both in the following section.
Install Azure Identity and Microsoft Graph SDK:
python3 -m pip install azure-identity
python3 -m pip install msgraph-sdk
Select config.sfg from the project root, replace <your-client-id>
with your Application (client) ID and replace <your-tenant-id>
with your Directory (tenant) ID.
Run the app:
python3 main.py
Create a connection: Select 1. Create External Connection from the menu, this step will require you to enter connection id
,connection name
and connection description
to create the connector.
Create a schema: Select 2. Create Schema from the menu, this step will require you to enter the connection id
of the connector you created earlier and create a schema for your connector.
Load data: Select 3. Load GitHub Repositories from the menu, this step will require you to enter connection id
of your connector and GitHub account name
to load public GitHub repositories of the account in the connector.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.