{"id":15867,"date":"2023-10-24T08:32:38","date_gmt":"2023-10-24T15:32:38","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/?p=15867"},"modified":"2023-10-24T08:32:38","modified_gmt":"2023-10-24T15:32:38","slug":"anatomy-of-a-microsoft-graph-connector","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/anatomy-of-a-microsoft-graph-connector\/","title":{"rendered":"Anatomy of a Microsoft Graph connector"},"content":{"rendered":"<p>In our <a href=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/find-what-you-need-with-microsoft-graph-connectors\/\">recent post<\/a>, we introduced Microsoft Graph connectors and how they help bring your organization&#8217;s content into Microsoft Graph and Semantic Index for Copilot to appear across Microsoft 365 experiences, making it easy for users in your organization to easily discover and share content relevant to them while staying in the flow of work.<\/p>\n<p>Now, let&#8217;s go under the hood to better understand the building blocks of a Microsoft Graph connector.<\/p>\n<h2>Key components of a Microsoft Graph connector<\/h2>\n<p>First, let\u2019s break things down \u2013 Microsoft Graph connectors are responsible for three things:<\/p>\n<ol>\n<li>Creating an external connection to your data sources<\/li>\n<li>Defining schema for the external content<\/li>\n<li>Managing external content that\u2019s imported to Microsoft 365<\/li>\n<\/ol>\n<p>The following diagram illustrates these responsibilities:<\/p>\n<p><img decoding=\"async\" width=\"1099\" height=\"482\" class=\"wp-image-15868 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/10\/word-image-15867-1.png\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/10\/word-image-15867-1.png 1099w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/10\/word-image-15867-1-300x132.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/10\/word-image-15867-1-1024x449.png 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/10\/word-image-15867-1-768x337.png 768w\" sizes=\"(max-width: 1099px) 100vw, 1099px\" \/><\/p>\n<p>An <strong>external connection<\/strong> defines the source of external content that you\u2019ll ingest into Microsoft 365. It contains information such as:<\/p>\n<ul>\n<li>Name and description<\/li>\n<li>Schema, which is a list of properties that are indexed for the external content<\/li>\n<li>External content (referred to as external items) that are imported into Microsoft 365<\/li>\n<\/ul>\n<p>Each <strong>external item<\/strong> contains:<\/p>\n<ul>\n<li>Content that\u2019s indexed<\/li>\n<li>Metadata that describes the content as defined by the external connection schema (e.g., author of an item; when and by who it was last modified; where the content is located, etc.)<\/li>\n<li>Access control list (ACL) that describes who is allowed to see the content<\/li>\n<li>Optionally, activities on the content that support its discovery in the different Microsoft 365 experiences<\/li>\n<\/ul>\n<h2>Piecing the building blocks together<\/h2>\n<p>In its simplest form, a Microsoft Graph connector consists of a Microsoft Entra app registration, and custom code.<\/p>\n<p><img decoding=\"async\" width=\"1142\" height=\"574\" class=\"wp-image-15869 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/10\/word-image-15867-2.png\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/10\/word-image-15867-2.png 1142w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/10\/word-image-15867-2-300x151.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/10\/word-image-15867-2-1024x515.png 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2023\/10\/word-image-15867-2-768x386.png 768w\" sizes=\"(max-width: 1142px) 100vw, 1142px\" \/><\/p>\n<p>The Microsoft Entra app registration allows the Graph connector to authenticate with Microsoft 365 and call Microsoft Graph APIs. The Graph connector code creates the external connection and configures the schema. Then, regularly it connects to the external data source (1), authenticates with Microsoft Entra ID (2) and uses Microsoft Graph APIs to import the external content to Microsoft 365 (3).<\/p>\n<p>The simplest Microsoft Graph connector could be a PowerShell script built using the Microsoft Graph PowerShell SDK. You run the script once, or regularly, to ingest content from your external source to Microsoft 365.<\/p>\n<p>If you need a more robust solution, capable of handling large volumes of data and incremental crawls, you can build a Microsoft Graph connector as a cloud app using cloud-native building blocks such as serverless, queues and storage.<\/p>\n<p>Because you write the Graph connector\u2019s code responsible for connecting to the external content source, transforming the content to match the external connection\u2019s schema, and loading it to Microsoft 365 using Microsoft Graph APIs, you have the full flexibility of designing the connector so that it matches your specific needs.<\/p>\n<h2>Conclusion<\/h2>\n<p>You\u2019ve just learned about what makes Microsoft Graph connectors work \u2013 the connection, schema and indexing of your external content into Microsoft Graph. We\u2019ll be back soon to continue this series with a thorough walkthrough of how to build a custom Microsoft Graph connector. In the meantime, <a href=\"https:\/\/adoption.microsoft.com\/en-us\/sample-solution-gallery\/?keyword=&amp;sort-by=updateDateTime-true&amp;page=1&amp;product=Microsoft+Graph+connectors\">explore Microsoft Graph connector samples<\/a>, visit our <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/connectors\">Microsoft 365 Dev Center<\/a>, and follow us on <a href=\"https:\/\/twitter.com\/Microsoft365Dev\">Microsoft 365 Developer (@Microsoft365Dev) \/ X<\/a> for the latest news and announcements.<\/p>\n<p>Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn about the key components of a Microsoft Graph connector and how they help bring your organization&#8217;s content into Microsoft Graph and Semantic Index for Copilot.<\/p>\n","protected":false},"author":74222,"featured_media":15877,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3],"tags":[157],"class_list":["post-15867","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-graph","tag-microsoft-graph-connectors"],"acf":[],"blog_post_summary":"<p>Learn about the key components of a Microsoft Graph connector and how they help bring your organization&#8217;s content into Microsoft Graph and Semantic Index for Copilot.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/15867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/74222"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=15867"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/15867\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/15877"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=15867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=15867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=15867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}