{"id":1686,"date":"2017-08-12T23:45:15","date_gmt":"2017-08-12T23:45:15","guid":{"rendered":"http:\/\/zappysys.com\/blog\/?p=1686"},"modified":"2025-04-02T11:54:12","modified_gmt":"2025-04-02T11:54:12","slug":"calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel","status":"publish","type":"post","link":"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/","title":{"rendered":"How to use Office 365 API with SSIS (Mail, Calendar, Contacts, OneDrive, Excel)"},"content":{"rendered":"<h2>Introduction<\/h2>\n<div class=\"su-note\"  style=\"border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#fff7b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">NOTE: <strong>UPDATE:<\/strong>\u00a0ZappySys has released a brand new\u00a0<a href=\"https:\/\/zappysys.com\/api\/integration-hub\/outlook-mail-connector\/ssis\">API Connector for SSIS Outlook Mail (Office 365)<\/a>\u00a0which makes it much simpler to\u00a0<strong>download attachment, read \/ search Emails, Users, MailFolders, Send email and more in SSIS<\/strong>\u00a0compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.<\/p>\n<p>Please visit\u00a0<a href=\"https:\/\/zappysys.com\/api\/integration-hub\/\">this page to see all<\/a>\u00a0Pre-Configured ready to use API connectors which you can use in\u00a0<a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-api-source\/\">SSIS API Source<\/a>\u00a0\/\u00a0<a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-api-destination\/\">SSIS API Destination<\/a>\u00a0OR\u00a0<a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/odbc-api-driver\/\">API ODBC Driver<\/a>\u00a0(for non-SSIS Apps such as Excel, Power BI, Informatica).<\/div><\/div>\n<p><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/microsoft-office-365-api-integration.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1694\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/microsoft-office-365-api-integration.png\" alt=\"\" width=\"100\" height=\"100\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/microsoft-office-365-api-integration.png 241w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/microsoft-office-365-api-integration-150x150.png 150w\" sizes=\"(max-width: 100px) 100vw, 100px\" \/><\/a>In this post you will learn how to access <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/concepts\/overview\" target=\"_blank\" rel=\"noopener\">Microsoft Graph API<\/a>\u00a0 (Office 365 REST API \/ Sharepoint API) inside SSIS without any coding. <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/concepts\/overview\" target=\"_blank\" rel=\"noopener\">Microsoft Graph API<\/a>\u00a0is a unified way to access many Microsoft services API including <strong>Office 365 API<\/strong>. In this post we will use <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-json-file-source\/\" target=\"_blank\" rel=\"noopener\">SSIS JSON Source \/ REST API Connector<\/a> to load data from Office 365 to SQL Server.<\/p>\n<p>&nbsp;<\/p>\n<h2>Use Case of Microsoft Graph API<\/h2>\n<p>Here are some use cases why you want to use Microsoft Graph API<\/p>\n<ul>\n<li>Read\/Write events from <strong>Outlook Calendar<\/strong><\/li>\n<li>Send <strong>email<\/strong>\u00a0 \/ Read <strong>emails<\/strong><\/li>\n<li>Get list of files from <strong>OneDrive<\/strong><\/li>\n<li>Upload\/ Download files to <strong>OneDrive<\/strong><\/li>\n<li>Read\/Write <strong>Excel Sheet<\/strong> (Use range or specific range of specific sheet)<\/li>\n<li>Read <strong>Sharepoint<\/strong> Document library<\/li>\n<li>Search content from <strong>Sharepoint<\/strong> document library<\/li>\n<li>Get AD users for your Organization (AD Accounts)<\/li>\n<li>Update OneNote<\/li>\n<li>Track changes to Users, Events, Calendar Items using <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/concepts\/delta_query_overview\" target=\"_blank\" rel=\"noopener\">delta API<\/a><\/li>\n<\/ul>\n<div class=\"content_block\" id=\"custom_post_widget-5670\"><h2 style=\"text-align: left;\">Register Application (OAuth2 App for Graph API)<\/h2>\r\n<p style=\"text-align: left;\">The first step to access any Office 365 API \/ Graph API is to register an OAuth App in the Azure Portal. After\r\nfollowing these steps, you will get the following two items to use in the next section:<\/p>\r\n\r\n<ul style=\"text-align: left;\">\r\n \t<li>Application Id<\/li>\r\n \t<li>Application Secret<\/li>\r\n<\/ul>\r\n<p style=\"text-align: left;\">In this section, you will learn how to register a custom app in Microsoft Azure portal that will allow access to the\r\nOneDrive. So, let's get started -<\/p>\r\n\r\n<ol>\r\n \t<li style=\"text-align: left;\">Log into <a href=\"https:\/\/portal.azure.com\/#blade\/Microsoft_AAD_IAM\/ActiveDirectoryMenuBlade\/RegisteredApps\">Microsoft\r\nAzure portal<\/a> to register a custom app.<\/li>\r\n \t<li style=\"text-align: left;\">Register a new application by clicking New Registration link.<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/NewRegistration.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9034\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/NewRegistration.png\" alt=\"New App Registration in Azure portal\" width=\"748\" height=\"221\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/NewRegistration.png 748w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/NewRegistration-300x89.png 300w\" sizes=\"(max-width: 748px) 100vw, 748px\" \/><\/a><\/li>\r\n \t<li style=\"text-align: left;\">Provide the name of the custom app and who can access the app in the organization.<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/RegisterOneDriveApp-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-9005 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/RegisterOneDriveApp-1.jpg\" alt=\"Register an OneDrive App\" width=\"610\" height=\"518\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/RegisterOneDriveApp-1.jpg 610w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/RegisterOneDriveApp-1-300x255.jpg 300w\" sizes=\"(max-width: 610px) 100vw, 610px\" \/><\/a><\/li>\r\n \t<li style=\"text-align: left;\">Go to the App overview and add a Redirect URL.<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/RedirectURI-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-9044 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/RedirectURI-1.jpg\" alt=\"Add a Redirect URL\" width=\"937\" height=\"122\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/RedirectURI-1.jpg 937w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/RedirectURI-1-300x39.jpg 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/RedirectURI-1-768x100.jpg 768w\" sizes=\"(max-width: 937px) 100vw, 937px\" \/><\/a><\/li>\r\n \t<li style=\"text-align: left;\">Click on \"Add a Platform\" under Platform Configuration section and then select \"Web\" under Web applications\r\nsection to enter a Redirect URL.\r\n<pre class=\"lang:default decode:true\">https:\/\/zappysys.com\/oauth<\/pre>\r\n<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/RedirectURI2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9007\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/RedirectURI2.jpg\" alt=\"Redirect URL\" width=\"466\" height=\"564\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/RedirectURI2.jpg 466w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/RedirectURI2-248x300.jpg 248w\" sizes=\"(max-width: 466px) 100vw, 466px\" \/><\/a><\/li>\r\n \t<li style=\"text-align: left;\">Create a Client Secret key which will be used to Authenticate the custom Azure app.<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/ClientSecret.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9010\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/ClientSecret.jpg\" alt=\"Add a Client Secret\" width=\"576\" height=\"403\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/ClientSecret.jpg 576w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/ClientSecret-300x210.jpg 300w\" sizes=\"(max-width: 576px) 100vw, 576px\" \/><\/a><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/ClientSecret2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9011\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/ClientSecret2.jpg\" alt=\"Secret Key Expiration Period\" width=\"208\" height=\"259\" \/><\/a><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/ClientSecret3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9012\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/ClientSecret3.jpg\" alt=\"Specify Secret Key\" width=\"1024\" height=\"176\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/ClientSecret3.jpg 1024w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/ClientSecret3-300x52.jpg 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/ClientSecret3-768x132.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a>\r\n<div><strong>Note<\/strong> - Take a note of <strong>Client Secret<\/strong>, it will be required while\r\nconfiguring OAuth connection in the SSIS later<\/div><\/li>\r\n \t<li style=\"text-align: left;\">Add API Permissions.<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/APIPermissions.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9008\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/APIPermissions.jpg\" alt=\"OneDrive API Permissions\" width=\"1291\" height=\"415\" \/><\/a><\/li>\r\n \t<li style=\"text-align: left;\">Select following permissions from the Delegated Permissions section.\r\n<pre class=\"lang:default decode:true\">User.ReadBasic.All\r\nFiles.Read\r\noffline_access<\/pre>\r\n<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/APIPermissions2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9009\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/APIPermissions2.jpg\" alt=\"Select Delegated Permissions\" width=\"512\" height=\"571\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/APIPermissions2.jpg 512w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/APIPermissions2-269x300.jpg 269w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/a><\/li>\r\n \t<li>Take a note of Client ID, it will be required while configuring OAuth connection in the SSIS later.<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/ClientSecret4.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-9013 size-full alignleft\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/07\/ClientSecret4.jpg\" alt=\"App Client ID\" width=\"810\" height=\"274\" \/><\/a><\/li>\r\n<\/ol><\/div>\n<h2>Step-By-Step : Access Outlook.com Emails using SSIS<\/h2>\n<p>Now lets look at examples to access your outlook.com emails using SSIS. You can use same techniques to call pretty much any Office 365 API.<\/p>\n<h3>Configure SSIS OAuth Connection for Graph REST API<\/h3>\n<p>First step to access any Graph API is configure OAuth connection<\/p>\n<ol>\n<li>Open Visual Studio<\/li>\n<li>Open existing SSIS Project or create new using File &gt; New &gt; Project &gt; Choose \u201cIntegration Services Project\u201d Type under Business Intelligence template category<\/li>\n<li>Open Package<\/li>\n<li>Right click inside Connection Managers area and click \u201cNew Connection\u2026\u201d<\/li>\n<li>From the connection type list select \u201cZS-OAUTH\u201d connection type.\n<div id=\"attachment_1569\" style=\"width: 687px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-oauth-create-new-connection.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1569\" class=\"size-full wp-image-1569\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-oauth-create-new-connection.png\" alt=\"Create new SSIS OAuth API Connection Manager\" width=\"677\" height=\"220\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-oauth-create-new-connection.png 677w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-oauth-create-new-connection-300x97.png 300w\" sizes=\"(max-width: 677px) 100vw, 677px\" \/><\/a><p id=\"caption-attachment-1569\" class=\"wp-caption-text\">Create new SSIS OAuth API Connection Manager<\/p><\/div><\/li>\n<li>On the OAuth Connection Manager configure following options\n<ol>\n<li>Select &#8220;Custom&#8221; from Provider dropdown<\/li>\n<li>Select OAuth2 from OAuth version<\/li>\n<li>Enter your Application Id and Secret Key (i.e. App Password) obtained in the previous section <a href=\"https:\/\/apps.dev.microsoft.com\/#\/appList\" target=\"_blank\" rel=\"noopener\">from here<\/a>.<\/li>\n<li>Enter following URL in the Authorization URL\n<pre class=\"lang:default decode:true\">https:\/\/login.microsoftonline.com\/common\/oauth2\/v2.0\/authorize<\/pre>\n<\/li>\n<li>Enter the following URL in the token URL field\n<pre class=\"lang:default decode:true\">https:\/\/login.microsoftonline.com\/common\/oauth2\/v2.0\/token<\/pre>\n<\/li>\n<li>Enter the following\u00a0<a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/authorization\/permission_scopes\" target=\"_blank\" rel=\"noopener\">Graph API Scopes<\/a> (each scope must be entered in a new line).\n<pre class=\"lang:default decode:true\">user.read\r\nmail.read\r\noffline_access<\/pre>\n<div class=\"su-note\"  style=\"border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#fff7b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\">NOTE: Always include\u00a0<strong>offline_access<\/strong>\u00a0scope returns refreh_token which allows you to renew token without going through login process again.\u00a0For more information about which scopes needed always refer to API help page (e.g. if you want to read mail using <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/api-reference\/v1.0\/api\/user_list_messages\" target=\"_blank\" rel=\"noopener\">this API<\/a> then you will see it says you can use <strong>Mail.Read<\/strong> or <strong>Mail.ReadWrite<\/strong> scope).<\/div><\/div><\/li>\n<li>Go to Advanced tab and enter the following URL in the Callback\/Return URL (Assuming exact same URL used when you registered App in the previous section)\n<pre class=\"lang:default decode:true\">https:\/\/zappysys.com\/oauth<\/pre>\n<\/li>\n<li>Now go back to first tab and Click Generate Token. When prompted Login using your Personal Microsoft Account or Work Account (Office 365 or AD login)<\/li>\n<li>After login you will see Accept option just click it. If things go right then you will see Access Token and Refresh Token fields will be populated.<\/li>\n<\/ol>\n<\/li>\n<li>Once all configured you can click Test to make sure connection works.\n<div id=\"attachment_1691\" style=\"width: 685px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/ssis-office-365-graph-rest-api-oauth-connection-manager.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1691\" class=\"size-full wp-image-1691\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/ssis-office-365-graph-rest-api-oauth-connection-manager.png\" alt=\"SSIS OAuth COnnection Manager for Office 365 REST API \/ Microsoft Graph API\" width=\"675\" height=\"654\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/ssis-office-365-graph-rest-api-oauth-connection-manager.png 675w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/ssis-office-365-graph-rest-api-oauth-connection-manager-300x291.png 300w\" sizes=\"(max-width: 675px) 100vw, 675px\" \/><\/a><p id=\"caption-attachment-1691\" class=\"wp-caption-text\">SSIS OAuth Connection Manager for Office 365 REST API \/ Microsoft Graph API<\/p><\/div><\/li>\n<\/ol>\n<h3><\/h3>\n<div class=\"su-note\"  style=\"border-color:#e5da9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#fff4b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><strong>NOTE:<\/strong>\u00a0Typically RefreshToken is longed lived but in some cases they may expire soon too. If that&#8217;s the case then you can configure above oauth connection for <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/active-directory\/develop\/v1-protocols-oauth-code\" target=\"_blank\" rel=\"noopener\">Changing RefreshToken pattern<\/a>. Simply enter token file path and re-authenticate by clicking Generate Token. After that each time you make an API call it will save new refresh token in file.<\/div><\/div>\n<h3>Configure SSIS JSON\/REST API Source<\/h3>\n<p>Once you configure OAuth connection you are ready to read data from Office 365 API. Lets look at step by step how to read emails using Mail API and save to SQL Server.<\/p>\n<ol>\n<li>Drag and drop Data flow task from SSIS toolbox<\/li>\n<li>Goto data flow designer and drag and drop <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-json-file-source\/\" target=\"_blank\" rel=\"noopener\">ZS JSON Source\/REST API Connector<\/a>\u00a0on the designer<\/li>\n<li>Double click to edit JSON Source.<\/li>\n<li>In the URL field enter below URL\n<pre class=\"lang:default decode:true\">https:\/\/graph.microsoft.com\/v1.0\/me\/messages<\/pre>\n<p>To customize URL with additional parameters check <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/overview\/query_parameters\" target=\"_blank\" rel=\"noopener\">this help link<\/a>. It&#8217;s a standard OData Protocol so you can leverage many common OData features (e.g. Use $top parameters to set pageSize. Default is 10 for List Mail but you can include more records per response by changing it such as <strong>&#8230;\/messages?$top=50<\/strong>).<\/li>\n<li>Check Use credentials option<\/li>\n<li>From the connections dropdown select OAuth Connection manager created in the previous section<\/li>\n<li>Change Data Format option to <strong>OData\u00a0<\/strong><\/li>\n<li>In the Filter enter following or click &#8220;Select Filter&#8221; and select Value Array node &gt; Click OK.\n<pre class=\"\">$.value[*]<\/pre>\n<\/li>\n<li>In the Max rows set to 200 so we don&#8217;t pull all data for now \ud83d\ude42 &#8230; This is our hello world example.<\/li>\n<li>Now click Preview to see data. If all is well then Save UI by clicking OK\n<div id=\"attachment_1693\" style=\"width: 852px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/ssis-get-data-from-microsoft-graph-api-office-365-json-rest-api-source.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1693\" class=\"size-full wp-image-1693\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/ssis-get-data-from-microsoft-graph-api-office-365-json-rest-api-source.png\" alt=\"SSIS JSON Source - Get data from Microsoft Graph API (Office 365 API - Read Mail Example)\" width=\"842\" height=\"695\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/ssis-get-data-from-microsoft-graph-api-office-365-json-rest-api-source.png 842w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/ssis-get-data-from-microsoft-graph-api-office-365-json-rest-api-source-300x248.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/ssis-get-data-from-microsoft-graph-api-office-365-json-rest-api-source-768x634.png 768w\" sizes=\"(max-width: 842px) 100vw, 842px\" \/><\/a><p id=\"caption-attachment-1693\" class=\"wp-caption-text\">SSIS JSON Source &#8211; Get data from Microsoft Graph API (Office 365 API &#8211; Read Mail Example)<\/p><\/div><\/li>\n<\/ol>\n<h3>Loading Graph API \/ Office 365 data to SQL Server<\/h3>\n<p>Now last step is loading Outlook data to SQL Server. For example purpose we will load data into SQL Server but you can load into any Target (e.g. Flat file, Oracle, Excel) using Microsoft or ZappySys Destination connectors<\/p>\n<p>To load Office 365 data into SQL Server perform the following steps<\/p>\n<ol>\n<li>Drag OLEDB destination on Data Flow surface<\/li>\n<li>Connect ZS JSON Source to Destination<\/li>\n<li>On OLEDB destination select \/ create new SQL Connection and then Click &#8220;New Table&#8221;<\/li>\n<li>Click on Mappings tab and click OK to save<\/li>\n<li>Execute Package<\/li>\n<\/ol>\n<div id=\"attachment_1617\" style=\"width: 792px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-xero-to-sql-server-data-load.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1617\" class=\"size-full wp-image-1617\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-xero-to-sql-server-data-load.png\" alt=\"Configure SSIS OLEDB Destination - Loading Xero Data into SQL Server Table\" width=\"782\" height=\"593\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-xero-to-sql-server-data-load.png 782w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-xero-to-sql-server-data-load-300x227.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-xero-to-sql-server-data-load-768x582.png 768w\" sizes=\"(max-width: 782px) 100vw, 782px\" \/><\/a><p id=\"caption-attachment-1617\" class=\"wp-caption-text\">Configure SSIS OLEDB Destination &#8211; Loading Xero Data into SQL Server Table<\/p><\/div>\n<div id=\"attachment_1618\" style=\"width: 744px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-xero-sql-server-load-mappings.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1618\" class=\"size-full wp-image-1618\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-xero-sql-server-load-mappings.png\" alt=\"Xero to SQL Server Column Mappings for OLEDB Destination\" width=\"734\" height=\"543\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-xero-sql-server-load-mappings.png 734w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-xero-sql-server-load-mappings-300x222.png 300w\" sizes=\"(max-width: 734px) 100vw, 734px\" \/><\/a><p id=\"caption-attachment-1618\" class=\"wp-caption-text\">Graph API \/ Office 365 to SQL Server Column Mappings for OLEDB Destination<\/p><\/div>\n<div id=\"attachment_1619\" style=\"width: 293px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-loading-data-from-xero-to-sql-server.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1619\" class=\"size-full wp-image-1619\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-loading-data-from-xero-to-sql-server.png\" alt=\"Loading Xero data to SQL Server in SSIS\" width=\"283\" height=\"391\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-loading-data-from-xero-to-sql-server.png 283w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-loading-data-from-xero-to-sql-server-217x300.png 217w\" sizes=\"(max-width: 283px) 100vw, 283px\" \/><\/a><p id=\"caption-attachment-1619\" class=\"wp-caption-text\">Loading Graph REST API \u00a0\/ Office 365 data to SQL Server in SSIS<\/p><\/div>\n<h2>POST data to Graph API (Insert or Update)<\/h2>\n<p>So far we have seen how to read data from Office 365 API. Now let&#8217;s look at how to write data to Office 365.<\/p>\n<p>There are two ways you can achieve this.<\/p>\n<ol>\n<li>Use <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-web-api-destination-connector\/\" target=\"_blank\" rel=\"noopener\">Web API Destination<\/a> in Data Flow<\/li>\n<li>Use <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-rest-api-web-service-task\/\" target=\"_blank\" rel=\"noopener\">REST API Task<\/a> in Control Flow<\/li>\n<\/ol>\n<p>Read this article to learn more about <a href=\"\/\/zappysys.com\/blog\/http-post-in-ssis-send-data-to-web-api-url-json-xml\/\" target=\"_blank\" rel=\"noopener\">API POST using SSIS<\/a><\/p>\n<h3>Using SSIS Web API Task (Write data from SQL Server to Office 365 \/ Graph API)<\/h3>\n<h3><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/zappysys.com\/onlinehelp\/ssis-powerpack\/scr\/images\/web-api-destination\/ssis-web-api-destination-post-json-to-rest-api-url.png?resize=503%2C403\" alt=\"SSIS Web API Destination - POST JSON to REST API Endpoint, Create \/ Update records\" \/><\/h3>\n<h3>Using REST API Task to POST data to Graph API<\/h3>\n<p>If you have JSON\/XML data already prepared and if you like to POST it to Graph API then REST API Task would be easy to use.<\/p>\n<p>REST API Task Body can be direct string, variable (e.g. {{User::varSomeData}} or <a href=\"https:\/\/zappysys.com\/blog\/rest-api-file-upload-using-ssis-multi-part-post\/\" target=\"_blank\" rel=\"noopener\">Body can come from File\u00a0<\/a><\/p>\n<div id=\"attachment_1616\" style=\"width: 872px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-post-data-xero-api-create-contacts-example.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1616\" class=\"size-full wp-image-1616\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-post-data-xero-api-create-contacts-example.png\" alt=\"SSIS REST API Task - POST data to Xero (Create contacts)\" width=\"862\" height=\"602\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-post-data-xero-api-create-contacts-example.png 862w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-post-data-xero-api-create-contacts-example-300x210.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/07\/ssis-post-data-xero-api-create-contacts-example-768x536.png 768w\" sizes=\"(max-width: 862px) 100vw, 862px\" \/><\/a><p id=\"caption-attachment-1616\" class=\"wp-caption-text\">SSIS REST API Task &#8211; POST data to Graph API<\/p><\/div>\n<h2>Download file from OneDrive<\/h2>\n<p>To download file from OneDrive perform these steps<\/p>\n<p><a href=\"https:\/\/zappysys.zendesk.com\/hc\/en-us\/articles\/115005010573-How-to-download-file-from-OneDrive-using-Graph-API\" target=\"_blank\" rel=\"noopener\">https:\/\/zappysys.zendesk.com\/hc\/en-us\/articles\/115005010573-How-to-download-file-from-OneDrive-using-Graph-API<\/a><\/p>\n<h2>Upload file to OneDrive<\/h2>\n<p><a href=\"https:\/\/zappysys.zendesk.com\/hc\/en-us\/articles\/115004893713-How-to-upload-file-to-OneDrive-using-Office-365-Graph-API\" target=\"_blank\" rel=\"noopener\">https:\/\/zappysys.zendesk.com\/hc\/en-us\/articles\/115004893713-How-to-upload-file-to-OneDrive-using-Office-365-Graph-API<\/a><\/p>\n<h2>Reading Office Excel Sheets from OneDrive<\/h2>\n<p>JSON Source also support reading API response which returns 2D arrays. Such as <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/api-reference\/v1.0\/resources\/excel\" target=\"_blank\" rel=\"noopener\">Office Excel Spreadsheet API<\/a> to read excel data. Check\u00a0<a href=\"\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/\" target=\"_blank\" rel=\"noopener\">this blog post<\/a> to learn similar scenario to parse 2D arrays. There are few other options for parsing 2D arrays which are <a href=\"\/\/zappysys.com\/blog\/parse-multi-dimensional-json-array-ssis\/\" target=\"_blank\" rel=\"noopener\">documented here<\/a>.<\/p>\n<pre class=\"\">https:\/\/graph.microsoft.com\/v1.0\/me\/drive\/items\/01CYZLFJDYxxxxxxx\/workbook\/worksheets('test')\/range(address='A1:B200')<\/pre>\n<h2>Testing Office 365 API using Graph API Explorer<\/h2>\n<p>If you like to test API request\/response inside browser then Microsoft provides really great tool to called Graph API Explorer. <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/graph-explorer\" target=\"_blank\" rel=\"noopener\">Click here to try Graph API Explorer<\/a>.<\/p>\n<p>See below screenshot<\/p>\n<p><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/test-office-365-graph-api-from-rest-api-explorer-read-mail-calendar-people-onedrive.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1701\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/test-office-365-graph-api-from-rest-api-explorer-read-mail-calendar-people-onedrive.png\" alt=\"\" width=\"1085\" height=\"538\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/test-office-365-graph-api-from-rest-api-explorer-read-mail-calendar-people-onedrive.png 1085w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/test-office-365-graph-api-from-rest-api-explorer-read-mail-calendar-people-onedrive-300x149.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/test-office-365-graph-api-from-rest-api-explorer-read-mail-calendar-people-onedrive-768x381.png 768w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/test-office-365-graph-api-from-rest-api-explorer-read-mail-calendar-people-onedrive-1024x508.png 1024w\" sizes=\"(max-width: 1085px) 100vw, 1085px\" \/><\/a><\/p>\n<h2>Common Errors<\/h2>\n<div class=\"content_block\" id=\"custom_post_widget-1887\"><h3>Truncation related error<\/h3>\r\n<p style=\"text-align: justify;\">The most common error you may face when you run an SSIS package is truncation error. During the design time only 300 rows are scanned from a source (a file or a REST API call response) to detect datatypes but at runtime, it is likely you will retrieve far more records. So it is possible that you will get longer strings than initially expected.\u00a0For detailed instructions on how to fix common metadata related errors read an article \"<a href=\"\/\/zappysys.com\/blog\/handling-ssis-component-metadata-issues\/\" target=\"_blank\" rel=\"noopener\">How to handle SSIS errors (truncation, metadata issues)<\/a>\".<\/p>\r\n\r\n<h3>Authentication related error<\/h3>\r\nAnother frequent error you may get is an authentication error, which happens when you deploy\/copy a package to another machine and run it there. Check <a href=\"#Deployment_to_Production\">the paragraph below<\/a>\u00a0to see why it happens and how to solve this problem.<\/div>\n<h2>Deployment to Production<\/h2>\n<div class=\"content_block\" id=\"custom_post_widget-1932\"><p style=\"text-align: justify;\">In SSIS package <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/integration-services\/security\/access-control-for-sensitive-data-in-packages\" target=\"_blank\" rel=\"noopener\">sensitive data such as tokens and passwords are by default encrypted by SSIS<\/a> with your Windows account which you use to create a package.\u00a0So SSIS will fail to decrypt tokens\/passwords when you run it from another machine using another Windows account. To circumvent this when you are creating an SSIS package which uses authentication components (e.g. an <a href=\"https:\/\/zappysys.com\/onlinehelp\/ssis-powerpack\/scr\/ssis-oauth-connection-manager.htm\" target=\"_blank\" rel=\"noopener\">OAuth Connection Manager<\/a>\u00a0or an <a href=\"https:\/\/zappysys.com\/onlinehelp\/ssis-powerpack\/scr\/ssis-http-connection-manager.htm\" target=\"_blank\" rel=\"noopener\">HTTP Connection Manager<\/a> with credentials, etc.), consider using parameters\/variables to pass tokens\/passwords. In this way, you won\u2019t face authentication related errors when a package is deployed to a production server.<\/p>\r\n<p style=\"text-align: justify;\">Check our article on <a href=\"https:\/\/zappysys.com\/blog\/how-to-run-an-ssis-package-with-sensitive-data-on-sql-server\/\" target=\"_blank\" rel=\"noopener\">how to configure packages with sensitive data on your production or development server<\/a>.<\/p><\/div>\n<h2><span id=\"ConclusionWhat8217s_next\">Conclusion.\u00a0What\u2019s next?<\/span><\/h2>\n<p>In this article we have learned how to load data from Microsoft Graph API to SQL Server using SSIS ( drag and drop approach without coding). We used\u00a0<a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/\" target=\"_blank\" rel=\"noopener\">SSIS JSON \/ REST API Connector<\/a>\u00a0to extract data from Outlook Mail using OAuth. JSON Source makes it super simple to parsing complex \/ large JSON Files or any Web API Response into rows and column so you can load into database like SQL Server.\u00a0<a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/\">Download SSIS PowerPack<\/a>\u00a0to try many other automation scenarios not discussed in this article.<\/p>\n<p><strong>Keywords:<\/strong><\/p>\n<p>Office 365 API Integration with SQL Server | How to extract Office 365 data in SSIS? | How to read outlook mail, calendar event and contacts? | Calling Microsoft Graph API using SSIS. | Office 365 to SQL Server | SQL Server to Office 365 | SSIS Office 365 API Integration |\u00a0SSIS Graph API Integration<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In this post you will learn how to access Microsoft Graph API\u00a0 (Office 365 REST API \/ Sharepoint API) inside SSIS without any coding. Microsoft Graph API\u00a0is a unified way to access many Microsoft services API including Office 365 API. In this post we will use SSIS JSON Source \/ REST API Connector to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1694,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[225],"tags":[228,60,227,12,148,208],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>How to use Office 365 API with SSIS (Mail, Calendar, Contacts, OneDrive, Excel) | ZappySys Blog<\/title>\r\n<meta name=\"description\" content=\"Read\/Write data using Office 365 API inside SSIS. Use Drag and Drop approach. Call Microsoft Graph API for Outlook Mail, Calendar, Contacts, Excel, OneDrive\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"How to use Office 365 API with SSIS (Mail, Calendar, Contacts, OneDrive, Excel) | ZappySys Blog\" \/>\r\n<meta property=\"og:description\" content=\"Read\/Write data using Office 365 API inside SSIS. Use Drag and Drop approach. Call Microsoft Graph API for Outlook Mail, Calendar, Contacts, Excel, OneDrive\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/\" \/>\r\n<meta property=\"og:site_name\" content=\"ZappySys Blog\" \/>\r\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ZappySys\/\" \/>\r\n<meta property=\"article:published_time\" content=\"2017-08-12T23:45:15+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2025-04-02T11:54:12+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/microsoft-office-365-api-integration.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"241\" \/>\r\n\t<meta property=\"og:image:height\" content=\"241\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"ZappySys\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/zappysys\/\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ZappySys\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/\",\"url\":\"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/\",\"name\":\"How to use Office 365 API with SSIS (Mail, Calendar, Contacts, OneDrive, Excel) | ZappySys Blog\",\"isPartOf\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/microsoft-office-365-api-integration.png\",\"datePublished\":\"2017-08-12T23:45:15+00:00\",\"dateModified\":\"2025-04-02T11:54:12+00:00\",\"author\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82\"},\"description\":\"Read\/Write data using Office 365 API inside SSIS. Use Drag and Drop approach. Call Microsoft Graph API for Outlook Mail, Calendar, Contacts, Excel, OneDrive\",\"breadcrumb\":{\"@id\":\"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/#primaryimage\",\"url\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/microsoft-office-365-api-integration.png\",\"contentUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/microsoft-office-365-api-integration.png\",\"width\":241,\"height\":241},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/zappysys.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to use Office 365 API with SSIS (Mail, Calendar, Contacts, OneDrive, Excel)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/zappysys.com\/blog\/#website\",\"url\":\"https:\/\/zappysys.com\/blog\/\",\"name\":\"ZappySys Blog\",\"description\":\"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/zappysys.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82\",\"name\":\"ZappySys\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g\",\"caption\":\"ZappySys\"},\"sameAs\":[\"http:\/\/www.zappysys.com\/\",\"https:\/\/www.facebook.com\/ZappySys\/\",\"https:\/\/twitter.com\/https:\/\/twitter.com\/zappysys\/\"],\"url\":\"https:\/\/zappysys.com\/blog\/author\/admin\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to use Office 365 API with SSIS (Mail, Calendar, Contacts, OneDrive, Excel) | ZappySys Blog","description":"Read\/Write data using Office 365 API inside SSIS. Use Drag and Drop approach. Call Microsoft Graph API for Outlook Mail, Calendar, Contacts, Excel, OneDrive","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/","og_locale":"en_US","og_type":"article","og_title":"How to use Office 365 API with SSIS (Mail, Calendar, Contacts, OneDrive, Excel) | ZappySys Blog","og_description":"Read\/Write data using Office 365 API inside SSIS. Use Drag and Drop approach. Call Microsoft Graph API for Outlook Mail, Calendar, Contacts, Excel, OneDrive","og_url":"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/","og_site_name":"ZappySys Blog","article_author":"https:\/\/www.facebook.com\/ZappySys\/","article_published_time":"2017-08-12T23:45:15+00:00","article_modified_time":"2025-04-02T11:54:12+00:00","og_image":[{"width":241,"height":241,"url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/microsoft-office-365-api-integration.png","type":"image\/png"}],"author":"ZappySys","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/zappysys\/","twitter_misc":{"Written by":"ZappySys","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/","url":"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/","name":"How to use Office 365 API with SSIS (Mail, Calendar, Contacts, OneDrive, Excel) | ZappySys Blog","isPartOf":{"@id":"https:\/\/zappysys.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/#primaryimage"},"image":{"@id":"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/#primaryimage"},"thumbnailUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/microsoft-office-365-api-integration.png","datePublished":"2017-08-12T23:45:15+00:00","dateModified":"2025-04-02T11:54:12+00:00","author":{"@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82"},"description":"Read\/Write data using Office 365 API inside SSIS. Use Drag and Drop approach. Call Microsoft Graph API for Outlook Mail, Calendar, Contacts, Excel, OneDrive","breadcrumb":{"@id":"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/#primaryimage","url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/microsoft-office-365-api-integration.png","contentUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/microsoft-office-365-api-integration.png","width":241,"height":241},{"@type":"BreadcrumbList","@id":"https:\/\/zappysys.com\/blog\/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zappysys.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to use Office 365 API with SSIS (Mail, Calendar, Contacts, OneDrive, Excel)"}]},{"@type":"WebSite","@id":"https:\/\/zappysys.com\/blog\/#website","url":"https:\/\/zappysys.com\/blog\/","name":"ZappySys Blog","description":"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zappysys.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82","name":"ZappySys","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g","caption":"ZappySys"},"sameAs":["http:\/\/www.zappysys.com\/","https:\/\/www.facebook.com\/ZappySys\/","https:\/\/twitter.com\/https:\/\/twitter.com\/zappysys\/"],"url":"https:\/\/zappysys.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/1686"}],"collection":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/comments?post=1686"}],"version-history":[{"count":26,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/1686\/revisions"}],"predecessor-version":[{"id":11318,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/1686\/revisions\/11318"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media\/1694"}],"wp:attachment":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media?parent=1686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/categories?post=1686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/tags?post=1686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}