├── .gitattributes ├── .gitignore ├── AttachmentDemo.sln ├── AttachmentDemo ├── AttachmentDemo.csproj ├── AttachmentDemoManifest │ ├── AttachmentDemo.xml │ └── SharePointProjectItem.spdata └── app.config ├── AttachmentDemoWeb ├── App_Start │ ├── OpenIdConnectCachingSecurityTokenProvider.cs │ └── WebApiConfig.cs ├── AttachmentDemoWeb.csproj ├── Content │ ├── fabric.components.css │ ├── fabric.components.min.css │ ├── fabric.components.rtl.css │ ├── fabric.components.rtl.min.css │ ├── fabric.min.css │ └── fabric.rtl.min.css ├── Controllers │ └── SaveAttachmentsController.cs ├── Functions │ ├── FunctionFile.html │ └── FunctionFile.js ├── Global.asax ├── Global.asax.cs ├── Images │ ├── add-in-icon-hi-res.png │ ├── add-in-icon-lo-res.png │ ├── open-pane-16.png │ ├── open-pane-32.png │ ├── open-pane-64.png │ ├── open-pane-80.png │ ├── save-all-16.png │ ├── save-all-32.png │ ├── save-all-64.png │ └── save-all-80.png ├── MessageRead.css ├── MessageRead.html ├── MessageRead.js ├── Models │ ├── OutlookAttachment.cs │ └── SaveAttachmentRequest.cs ├── Properties │ └── AssemblyInfo.cs ├── Scripts │ ├── Office │ │ └── MicrosoftAjax.js │ ├── authconfig.js │ ├── fabric.d.ts │ ├── fabric.js │ ├── fabric.min.js │ ├── helpers.js │ ├── jquery-3.5.1.intellisense.js │ ├── jquery-3.5.1.js │ ├── jquery-3.5.1.min.js │ ├── jquery-3.5.1.min.map │ ├── jquery-3.5.1.slim.js │ ├── jquery-3.5.1.slim.min.js │ ├── jquery-3.5.1.slim.min.map │ ├── office.helpers.js │ └── office.helpers.min.js ├── Startup.cs ├── Web.Debug.config ├── Web.Release.config ├── Web.config └── packages.config ├── LICENSE.txt ├── NuGet.Config ├── ReadMe.md ├── SSO-Update.md ├── manifest-schema-fix └── MailAppVersionOverridesV1_1.xsd ├── old ├── AttachmentsDemo.sln ├── AttachmentsDemo │ ├── AttachmentsDemo.csproj │ └── AttachmentsDemoManifest │ │ ├── AttachmentsDemo.xml │ │ └── SharePointProjectItem.spdata └── AttachmentsDemoWeb │ ├── AppRead │ ├── App.css │ ├── App.js │ ├── Home │ │ ├── Home.css │ │ ├── Home.html │ │ └── Home.js │ └── OAuthRedirect.html │ ├── AttachmentsDemoWeb.csproj │ ├── Content │ └── Office.css │ ├── Controllers │ ├── GetAttachmentController.cs │ └── OAuthController.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Images │ └── Close.png │ ├── Properties │ └── AssemblyInfo.cs │ ├── Scripts │ ├── Office │ │ └── MicrosoftAjax.js │ ├── _officeintellisense.js │ ├── _references.js │ ├── jquery-1.9.1.intellisense.js │ ├── jquery-1.9.1.js │ ├── jquery-1.9.1.min.js │ └── jquery-1.9.1.min.map │ ├── Storage │ ├── AppConfig.cs │ └── AppConfigCache.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ └── packages.config ├── outlook-add-in-attachments-demo.yml └── readme-images ├── app-registration.PNG ├── buttons-outlook.PNG ├── buttons-owa.PNG ├── graph-permissions-app-registration.PNG ├── manifest-prompt.PNG └── web-api-app-registration.PNG /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.sln.docstates 8 | 9 | # Build results 10 | 11 | [Dd]ebug/ 12 | [Rr]elease/ 13 | x64/ 14 | build/ 15 | [Bb]in/ 16 | [Oo]bj/ 17 | 18 | # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets 19 | !packages/*/build/ 20 | 21 | # MSTest test Results 22 | [Tt]est[Rr]esult*/ 23 | [Bb]uild[Ll]og.* 24 | 25 | *_i.c 26 | *_p.c 27 | *.ilk 28 | *.meta 29 | *.obj 30 | *.pch 31 | *.pdb 32 | *.pgc 33 | *.pgd 34 | *.rsp 35 | *.sbr 36 | *.tlb 37 | *.tli 38 | *.tlh 39 | *.tmp 40 | *.tmp_proj 41 | *.log 42 | *.vspscc 43 | *.vssscc 44 | .builds 45 | *.pidb 46 | *.log 47 | *.scc 48 | 49 | # Visual C++ cache files 50 | ipch/ 51 | *.aps 52 | *.ncb 53 | *.opensdf 54 | *.sdf 55 | *.cachefile 56 | 57 | # Visual Studio profiler 58 | *.psess 59 | *.vsp 60 | *.vspx 61 | 62 | # Guidance Automation Toolkit 63 | *.gpState 64 | 65 | # ReSharper is a .NET coding add-in 66 | _ReSharper*/ 67 | *.[Rr]e[Ss]harper 68 | 69 | # TeamCity is a build add-in 70 | _TeamCity* 71 | 72 | # DotCover is a Code Coverage Tool 73 | *.dotCover 74 | 75 | # NCrunch 76 | *.ncrunch* 77 | .*crunch*.local.xml 78 | 79 | # Installshield output folder 80 | [Ee]xpress/ 81 | 82 | # DocProject is a documentation generator add-in 83 | DocProject/buildhelp/ 84 | DocProject/Help/*.HxT 85 | DocProject/Help/*.HxC 86 | DocProject/Help/*.hhc 87 | DocProject/Help/*.hhk 88 | DocProject/Help/*.hhp 89 | DocProject/Help/Html2 90 | DocProject/Help/html 91 | 92 | # Click-Once directory 93 | publish/ 94 | 95 | # Publish Web Output 96 | *.Publish.xml 97 | 98 | # NuGet Packages Directory 99 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 100 | packages/ 101 | 102 | # Windows Azure Build Output 103 | csx 104 | *.build.csdef 105 | 106 | # Windows Store app package directory 107 | AppPackages/ 108 | 109 | # Others 110 | sql/ 111 | *.Cache 112 | ClientBin/ 113 | [Ss]tyle[Cc]op.* 114 | ~$* 115 | *~ 116 | *.dbmdl 117 | *.[Pp]ublish.xml 118 | *.pfx 119 | *.publishsettings 120 | 121 | # RIA/Silverlight projects 122 | Generated_Code/ 123 | 124 | # Backup & report files from converting an old project file to a newer 125 | # Visual Studio version. Backup files are not needed, because we have git ;-) 126 | _UpgradeReport_Files/ 127 | Backup*/ 128 | UpgradeLog*.XML 129 | UpgradeLog*.htm 130 | 131 | # SQL Server files 132 | App_Data/*.mdf 133 | App_Data/*.ldf 134 | 135 | 136 | #LightSwitch generated files 137 | GeneratedArtifacts/ 138 | _Pvt_Extensions/ 139 | ModelManifest.xml 140 | 141 | # ========================= 142 | # Windows detritus 143 | # ========================= 144 | 145 | # Windows image file caches 146 | Thumbs.db 147 | ehthumbs.db 148 | 149 | # Folder config file 150 | Desktop.ini 151 | 152 | # Recycle Bin used on file shares 153 | $RECYCLE.BIN/ 154 | 155 | # Mac desktop service store files 156 | .DS_Store 157 | 158 | # Office Javascript API stuff 159 | AttachmentsDemoWeb/Scripts/Office/1.1/ 160 | AttachmentsDemoWeb/Scripts/Office/metadata/ 161 | AttachmentsDemoWeb/Content/OfficeThemes.css 162 | 163 | # Other Visual Studio stuff 164 | *.userosscache 165 | .vs/ 166 | MyClientId.txt -------------------------------------------------------------------------------- /AttachmentDemo.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26430.6 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AttachmentDemo", "AttachmentDemo\AttachmentDemo.csproj", "{31C0927F-EB36-437D-A1C8-CEE07E6EFAE6}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AttachmentDemoWeb", "AttachmentDemoWeb\AttachmentDemoWeb.csproj", "{E7C49DB7-9D4F-47A2-8191-462BA0A2F314}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {31C0927F-EB36-437D-A1C8-CEE07E6EFAE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {31C0927F-EB36-437D-A1C8-CEE07E6EFAE6}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {31C0927F-EB36-437D-A1C8-CEE07E6EFAE6}.Debug|Any CPU.Deploy.0 = Debug|Any CPU 19 | {31C0927F-EB36-437D-A1C8-CEE07E6EFAE6}.Release|Any CPU.ActiveCfg = Release|Any CPU 20 | {31C0927F-EB36-437D-A1C8-CEE07E6EFAE6}.Release|Any CPU.Build.0 = Release|Any CPU 21 | {31C0927F-EB36-437D-A1C8-CEE07E6EFAE6}.Release|Any CPU.Deploy.0 = Release|Any CPU 22 | {E7C49DB7-9D4F-47A2-8191-462BA0A2F314}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {E7C49DB7-9D4F-47A2-8191-462BA0A2F314}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {E7C49DB7-9D4F-47A2-8191-462BA0A2F314}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {E7C49DB7-9D4F-47A2-8191-462BA0A2F314}.Release|Any CPU.Build.0 = Release|Any CPU 26 | EndGlobalSection 27 | GlobalSection(SolutionProperties) = preSolution 28 | HideSolutionNode = FALSE 29 | EndGlobalSection 30 | EndGlobal 31 | -------------------------------------------------------------------------------- /AttachmentDemo/AttachmentDemo.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | {31C0927F-EB36-437D-A1C8-CEE07E6EFAE6} 7 | Library 8 | Properties 9 | AttachmentDemo 10 | AttachmentDemo 11 | v4.5.2 12 | 15.0 13 | 512 14 | {C1CDDADD-2546-481F-9697-4EA41081F2FC};{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15 | False 16 | {14256760-c28a-4184-a0c7-3cf17ef7a933} 17 | {10573491-c058-4b2f-a6b2-65acf9de4525} 18 | {74848a92-bcc5-42d6-9277-2765829331a7} 19 | {7bf44205-f48e-4299-a0a1-c01933abf713} 20 | {c70beca9-83fd-4561-8db2-4bf672641712} 21 | MailApp 22 | 14.0 23 | 14.0 24 | 25 | 26 | true 27 | full 28 | false 29 | bin\Debug\ 30 | DEBUG;TRACE 31 | prompt 32 | 4 33 | false 34 | 35 | 36 | pdbonly 37 | true 38 | bin\Release\ 39 | TRACE 40 | prompt 41 | 4 42 | false 43 | 44 | 45 | 46 | Designer 47 | 48 | 49 | {c656cc7b-84b4-4138-a4cd-5856f6a5c68b} 50 | 51 | 52 | manifest-oemanifest 53 | Designer 54 | 55 | 56 | 57 | 58 | {E7C49DB7-9D4F-47A2-8191-462BA0A2F314} 59 | AttachmentDemoWeb 60 | True 61 | Web 62 | SharePointWebProjectOutput 63 | AttachmentDemoWeb 64 | False 65 | 66 | 67 | 68 | 10.0 69 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 70 | 71 | 72 | -------------------------------------------------------------------------------- /AttachmentDemo/AttachmentDemoManifest/AttachmentDemo.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 9 | 10 | 11 | 54ad5d2b-8352-46a7-8fc7-df772bbc5c9e 12 | 13 | 14 | 1.0.0.0 15 | Outlook Dev Center 16 | en-US 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | https://login.microsoftonline.com 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
39 | 40 | 41 | 250 42 | 43 |
44 |
45 | 46 | ReadItem 47 | 48 | 49 | 50 | false 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 |