Software tips, techniques, and news.

By Ian Haas  Posted on  January 18th, 2017  in  Free Downloads, FileMaker

Integrating FileMaker and SharePoint Using Microsoft Graph

Often times documents are commonly needed in multiple programs, but the lack of integration can result in having to enter in the same files in different applications. Microsoft Graph is a powerful tool that provides a unified API interface for many of Microsoft’s most popular Cloud programs, including the popular web-based application SharePoint.

Integration between SharePoint and FileMaker is even possible using Microsoft Graph. In this example I will demonstrate how to upload files from a FileMaker solution into your SharePoint site.

There are three main steps to the integration. Allowing access to your Microsoft Application, setting up OAuth 2.0 authentication, and the actual uploading of documents to Sharepoint.

Watch on Youtube: Integrating FileMaker and SharePoint Using Microsoft Graph

Setting Up Your Microsoft Application
In order to allow FileMaker to talk to your SharePoint solution using Microsoft Graph, you will first need to set up a Microsoft Application to allow access using OAuth 2.0. If you go to Microsoft’s My Applications page you can either edit an existing application or create a new one. (If you don’t have a site already, you will need to create a site in SharePoint prior to this). Make note of the Application ID (sometimes called the Client ID), you’ll need this in your FileMaker solution.

Next you’ll need to create a new Application Secret (again, sometimes called Client Secret). Generate and copy the password. This is the only time you will be able to copy this password, so be sure to document it somewhere or else you will have to generate a new password.

Now add a new web platform, and allow implicit flow and enter in the Redirect URI. The Redirect URI is just the web page the user will go to after they allow access to the SharePoint application.

filemaker secret redirect

Next you will need to allow Microsoft Graph Delegated Permissions. For the purposes of this demo you will only need the ones referenced in the image or in our Demo file.

filemaker delegated permissions

Setting Up OAuth 2.0 Connection
Now that we have our Microsoft Application set up, using the Application ID, Application Secret, Redirect URI, and Site Name we can talk to our SharePoint solution! The first step is getting the access code. You will need to call this in a web browser or Web Viewer in FileMaker using a URL.

filemaker allow access

Once you accept, you can grab the access code in the URL. Then using this, you can request a token to access your SharePoint site. A JSON-encoded response will bring you the account and refresh tokens, which you can then use to talk to your SharePoint solution.

For more about how OAuth 2.0 works, reference the OAuth 2.0 Authorization Code Flow.

Uploading Documents to SharePoint through FileMaker
With everything set in place, we can now upload documents through FileMaker into your SharePoint site. In order to upload files, we will need to use them to grab your Site ID in SharePoint. Below is the URL template.

https://graph.microsoft.com/beta/sharepoint:/YOUR_SITE_NAME_HERE

Be sure to set your authorization headers using the BE_HTTP_Set_Custom_Header and the access token before performing your GET call.

filemaker oauth2 token siteID

Next, use your Site ID to grab the drive ID where the document will be uploaded.

https://graph.microsoft.com/beta/sharepoint/sites/YOUR_SITE_ID_HERE/drive

Again be sure to set your authorization header with the access token. Then using the drive ID, you can use a PUT call to create the file in SharePoint! If it is successfully created, you will receive a JSON-response code with the information about the newly created item.

filemaker sharepoint item response code

And in the documents in SharePoint, the new document is created!

filemaker new document

The potential of SharePoint and FileMaker integration using Microsoft Graph goes beyond this. You can reference all the functionality on their API Documentation. There are even more Microsoft programs that can be integrated with FileMaker using Microsoft Graph, such as Excel, Outlook, and Webhooks.

Conclusion
With those three steps, documents added into FileMaker can easily be uploaded automatically into SharePoint. This integration allows documents to quickly and easily be uploaded and viewable in both applications. Microsoft Graph’s ever-expanding capabilities continue to allow for further integrations with Microsoft and other programs using a unified API interface.

Did you know we are an authorized reseller for FileMaker Licensing?
Contact us to discuss upgrading your FileMaker software.

Download
Download the Integrating FileMaker And SharePoint File
Please complete the form below to download your FREE FileMaker file.
FileMaker Experience *
Terms of Use *
OPT-IN: I agree that I am downloading a completely free FileMaker application file with no strings attached. This file is unlocked, and I may use it for my business or organization as I see fit. Because I am downloading a free file, I agree that I should receive occasional marketing. I understand that I can OPT-OUT of these emails at anytime.
Ian Haas thumbnail
Ian Haas

Ian is a skilled FileMaker Certified Developer who has a passion for building custom applications in various platforms, including FileMaker, iPhone, iPad, and for the web. One of his strengths is his keen ability to analyze a customer situation and offer a solution. With his accommodating nature, Ian works well with both customers and his teammates.

FileMaker 18 Certified Developer
FileMaker 17 Certified Developer
FileMaker 16 Certified Developer
FileMaker 15 Certified Developer
FileMaker 14 Certified Developer
FileMaker 13 Certified Developer
FileMaker 12 Certified Developer
FileMaker 11 Certified Developer
"We were actually able to add more features than we thought would be possible within our budget. We always experienced a ‘can do’ attitude and DB Services was incredibly patient and easy to work with."
Courtney Hartman
Art Director
"The new FileMaker custom website interface is very user-friendly and easy to follow for our clients. In addition, it is much faster than the old Instant Web Publishing (IWP) interface. Thank you and all the others who have helped us out at DB Services. I am very grateful for the excellent service you provide us. Its nice to know we can call you for help if we have an issue."
Wayne Capek
President
"We needed a solution that would simplify the administration of our responsibilities under our contract with the State of Indiana. We have seen a dramatic increase across the state in the number of potential foster and adoptive parents that have begun the preparation and training process. This increase has resulted in a significant opportunity for children available for adoption. That’s a big win for everyone! And it’s all because we can refer potential parents to the proper state contacts efficiently and quickly."
Chris Morrison
Executive Director
"Thank you for all of your expertise and valuable help. I am so grateful to have found DB Services."
Linda Findlay
Owner
"Thank you for our new database system. We transitioned from a carbon copy paper based system to a digital database. The software has saved us time and money. We used to archive all our jobs in cabinets, now we can look up a job in seconds from anywhere. The software allows us to easily email estimates to our customers in pdf format. In a year there was a return on investment just from eliminating the purchasing of our carbon forms."
Todd Cartmel
Owner
"The new system allows us to create and track jobs for customers along with inventory, something we had been doing with separate word and spreadsheet files. Because it’s now so intuitive, new staff members are able to begin using the database immediately without our usual training session and ‘cheat sheets’ for getting around within the file."
Tom Andrews
President