{"id":15102625,"url":"https://github.com/microsoft/learn-microsoft-graph-connectors-dotnet","last_synced_at":"2026-01-22T16:44:38.304Z","repository":{"id":253774553,"uuid":"844488994","full_name":"microsoft/learn-microsoft-graph-connectors-dotnet","owner":"microsoft","description":"Project for the Build Microsoft Graph connectors with .NET learn module","archived":false,"fork":false,"pushed_at":"2024-08-19T12:27:31.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-21T18:52:49.808Z","etag":null,"topics":["dotnet","microsoft-365","microsoft-copilot","microsoft-copilot-for-microsoft-365","microsoft-graph-connectors"],"latest_commit_sha":null,"homepage":"https://learn.microsoft.com/training/modules/copilot-graph-connectors/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-19T11:17:00.000Z","updated_at":"2025-11-25T19:28:00.000Z","dependencies_parsed_at":"2024-08-19T13:20:18.122Z","dependency_job_id":null,"html_url":"https://github.com/microsoft/learn-microsoft-graph-connectors-dotnet","commit_stats":null,"previous_names":["microsoft/learn-microsoft-graph-connectors-dotnet"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/microsoft/learn-microsoft-graph-connectors-dotnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Flearn-microsoft-graph-connectors-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Flearn-microsoft-graph-connectors-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Flearn-microsoft-graph-connectors-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Flearn-microsoft-graph-connectors-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/learn-microsoft-graph-connectors-dotnet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Flearn-microsoft-graph-connectors-dotnet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28666721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T14:01:31.714Z","status":"ssl_error","status_checked_at":"2026-01-22T13:59:23.143Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","microsoft-365","microsoft-copilot","microsoft-copilot-for-microsoft-365","microsoft-graph-connectors"],"created_at":"2024-09-25T19:03:29.324Z","updated_at":"2026-01-22T16:44:38.283Z","avatar_url":"https://github.com/microsoft.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microsoft Graph connector\n\nThis project contains a [Microsoft Graph connector](https://learn.microsoft.com/graph/connecting-external-content-connectors-overview). Using Graph connectors you can import external data into Microsoft 365 and Microsoft Search. Ingested content is available to Microsoft Copilot for Microsoft 365, Microsoft Search and other Microsoft 365 services.\n\nWhen developing the Graph connector, you can use [Dev Proxy](https://aka.ms/devproxy) to simulate Microsoft Graph API responses. This allows you to develop and test the connector without having to connect to the Microsoft Graph API and wait for the connection to be provisioned/removed.\n\n## Prerequisites\n\n- [Microsoft 365 Developer tenant](https://developer.microsoft.com/microsoft-365/dev-program)\n- [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0)\n- [Microsoft Graph PowerShell SDK](https://learn.microsoft.com/powershell/microsoftgraph/installation?view=graph-powershell-1.0)\n- Microsoft PowerShell\n\n## Minimal path to awesome\n\n- Create a new Microsoft Entra app registration (uses [Microsoft Graph PowerShell SDK](https://aka.ms/cli-m365)) by running `./setup.ps1`.\n- Complete project\n  - In `ConnectionConfiguration.cs`:\n    - Complete schema definition\n    - Define URL to item resolvers (optional but recommended)\n  - In `ContentService.cs`:\n    - Update the `Document` class to match the schema you defined previously\n    - Implement the `Extract` method to load the content to import\n    - Implement the `GetDocId` method to generate a unique ID for each document\n    - Update the `Transform` method that convert documents from the external system into Microsoft Graph external items, with the schema you defined previously\n  - In `resultLayout.json`:\n    - Update the Adaptive Card layout to match the schema you defined previously\n- Build the project: `dotnet build`\n- Create connection: `dotnet run -- create-connection` (this will take several minutes)\n- Load content: `dotnet run -- load-content`\n\nIf you want to simulate Microsoft Graph API responses using Dev Proxy:\n\n- [Install Dev Proxy](https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/get-started)\n- Open terminal\n  - Change the working directory to the project root\n  - Start Dev Proxy: `devproxy`\n- Open a new terminal\n  - Use the project as described above\n- When finished, stop Dev Proxy:\n  - In the terminal where Dev Proxy is running, press `Ctrl+C` to stop Dev Proxy\n\n## Project structure\n\n```text\n.\n├── .devproxy\n│   └── graph-connector-mocks.json\n├── .vscode\n│   ├── extensions.json\n│   ├── launch.json\n│   └── tasks.json\n├── CompleteJobWithDelayHandler.cs\n├── ConnectionConfiguration.cs\n├── ConnectionService.cs\n├── ContentService.cs\n├── DebugRequestHandler.cs\n├── DebugResponseHandler.cs\n├── GraphService.cs\n├── MsGraphDocs.csproj\n├── Program.cs\n├── devproxyrc.json\n├── resultLayout.json\n└── setup.ps1\n```\n\n### .devproxy/graph-connector-mocks.json\n\nDev Proxy Microsoft Graph API mocks for the Graph connector.\n\n### .vscode\n\nVisual Studio Code configuration files.\n\n### CompleteJobWithDelayMiddleware.cs\n\nMicrosoft Graph SDK Middleware to handle the long-running job of provisioning the connection's schema. The middleware waits for the job to complete before continuing. It waits the recommended 60 seconds before checking the job status.\n\n### ConnectionConfiguration.cs\n\nGraph connector configuration. You can define the schema for the external items, the URL to the item resolvers, and the connection name.\n\n### ConnectionService.cs\n\nCode to create the external connection and provision the schema.\n\n### ContentService.cs\n\nCode to load content to import. The code is organized following the Extract-Transform-Load (ETL) principle.\n\n### DebugRequestHandler.cs/DebugResponseHandler.cs\n\nMicrosoft Graph SDK Middleware to log requests and responses to the console. Disabled by default. Enable in the **GraphService.cs** file.\n\n### GraphService.cs\n\nMicrosoft Graph SDK client instantiation code.\n\n### Program.cs\n\nMain entry point that defines the commands to create the connection and load content.\n\n### devproxyrc.json\n\nDev Proxy configuration for use with the project.\n\n### resultLayout.json\n\nResult layout (Adaptive Card) for Microsoft Search.\n\n### setup.ps1\n\nSetup script to create a new Microsoft Entra app registration using Microsoft Graph PowerShell SDK. You need to install Microsoft Graph PowerShell SDK before using this script.\n\n## Contributing\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.\n\nWhen you submit a pull request, a CLA bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n## Trademarks\n\nThis project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft \ntrademarks or logos is subject to and must follow \n[Microsoft's Trademark \u0026 Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).\nUse of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.\nAny use of third-party trademarks or logos are subject to those third-party's policies.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Flearn-microsoft-graph-connectors-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2Flearn-microsoft-graph-connectors-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Flearn-microsoft-graph-connectors-dotnet/lists"}