{"id":15102624,"url":"https://github.com/microsoft/learn-microsoft-graph-connectors-typescript","last_synced_at":"2025-07-05T16:33:34.017Z","repository":{"id":253747355,"uuid":"844401050","full_name":"microsoft/learn-microsoft-graph-connectors-typescript","owner":"microsoft","description":"Project for the Build Microsoft Graph connectors with TypeScript learn module","archived":false,"fork":false,"pushed_at":"2025-01-21T21:53:51.000Z","size":38,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-05T00:13:51.932Z","etag":null,"topics":["microsoft-365","microsoft-copilot","microsoft-copilot-for-microsoft-365","microsoft-graph-connectors","typescript"],"latest_commit_sha":null,"homepage":"https://learn.microsoft.com/training/modules/copilot-graph-connectors-typescript/","language":"TypeScript","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-19T07:25:02.000Z","updated_at":"2025-04-04T02:02:32.000Z","dependencies_parsed_at":"2024-08-19T08:56:20.859Z","dependency_job_id":null,"html_url":"https://github.com/microsoft/learn-microsoft-graph-connectors-typescript","commit_stats":null,"previous_names":["microsoft/learn-microsoft-graph-connectors-typescript"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/microsoft/learn-microsoft-graph-connectors-typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Flearn-microsoft-graph-connectors-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Flearn-microsoft-graph-connectors-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Flearn-microsoft-graph-connectors-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Flearn-microsoft-graph-connectors-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/learn-microsoft-graph-connectors-typescript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Flearn-microsoft-graph-connectors-typescript/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263771282,"owners_count":23508897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["microsoft-365","microsoft-copilot","microsoft-copilot-for-microsoft-365","microsoft-graph-connectors","typescript"],"created_at":"2024-09-25T19:03:29.056Z","updated_at":"2025-07-05T16:33:33.995Z","avatar_url":"https://github.com/microsoft.png","language":"TypeScript","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## Minimal path to awesome\n\n- Create a new Microsoft Entra app registration (uses [CLI for Microsoft 365](https://aka.ms/cli-m365)):\n  - Bash:\n    ```bash\n    chmod +x ./setup.sh\n    ./setup.sh\n  - PowerShell:\n    ```powershell\n    ./setup.ps1\n    ```\n- Restore dependencies: `npm install`\n- Complete project\n  - In `config.ts`:\n    - Complete schema definition\n    - Define URL to item resolvers (optional but recommended)\n  - In `loadContent.ts`:\n    - Implement the `loadContent` function to load content to import\n    - Implement the `getDocId` function to generate a unique ID for each document\n    - Update the `transform` function that convert documents from the external system into Microsoft Graph external items, with the schema you defined previously\n- Build project: `npm run build`\n- Create connection: `npm run start:createConnection`\n- Load content: `npm run start:loadContent`\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  - Change the working directory to the project root\n  - Create connection: `npm run start:createConnection:proxy`\n  - Load content: `npm run start:loadContent:proxy`\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├── .gitignore\n├── .vscode\n│   ├── extensions.json\n│   └── launch.json\n├── README.md\n├── devproxyrc.json\n├── package.json\n├── resultLayout.json\n├── setup.ps1\n├── setup.sh\n├── src\n│   ├── completeJobWithDelayMiddleware.ts\n│   ├── config.ts\n│   ├── createConnection.ts\n│   ├── graphClient.ts\n│   └── loadContent.ts\n└── tsconfig.json (TypeScript configuration)\n```\n\n### .devproxy/graph-connector-mocks.json\n\nThis file contains the Dev Proxy Microsoft Graph API mocks for the Graph connector.\n\n### devproxyrc.json\n\nThis file contains the Dev Proxy configuration for use with the project.\n\n### resultLayout.json\n\nThis file contains the result layout (Adaptive Card) for Microsoft Search.\n\n### setup.ps1 and setup.sh\n\nThese scripts create a new Microsoft Entra app registration using CLI for Microsoft 365. Both scripts invoke CLI using npx, so that you don't need to manually install CLI for Microsoft 365 before you run these scripts.\n\n### src/completeJobWithDelayMiddleware.ts\n\nThis file contains the Microsoft 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### src/config.ts\n\nThis file contains the Graph connector configuration. You can define the schema for the external items, the URL to the item resolvers, and the connection name.\n\n### src/createConnection.ts\n\nThis file contains the code to create the external connection and provision the schema.\n\n### src/graphClient.ts\n\nThis file contains the Microsoft Graph SDK client instantiation code.\n\n### src/loadContent.ts\n\nThis file contains the code to load content to import. The code is organized following the Extract-Transform-Load (ETL) principle.\n\n### tsconfig.json\n\nThis file contains the TypeScript configuration for the project.\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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Flearn-microsoft-graph-connectors-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2Flearn-microsoft-graph-connectors-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Flearn-microsoft-graph-connectors-typescript/lists"}