Skip to content

Challenges we face while building integrations: SharePoint

Discover the real-world engineering challenges of building a SharePoint integration, from Graph API limitations to complex permission hierarchies and sandbox setups.

The Truto Team The Truto Team · · 4 min read
Challenges we face while building integrations: SharePoint

This blog post will give you a glimpse into the types of challenges the engineering team at Truto addresses while building an integration. We’ll use SharePoint as an example for this post.

Start to finish

The total time it took to build this integration was one week. It required a full week from a Senior Engineer, two days from the CTO, and half a day to get the sandbox provisioned.

Aside from the time, the most challenging aspect was the number of context switches we had to manage while building the integration. This negatively impacts productivity for engineering, product, and partnerships. For us, this is business, so it’s part of our work. Why let this impact a team whose core business is not integrations?

What you see in Truto is the end result of all this hard work, enabling you to simply plug-and-play the SharePoint integration without your engineering team having to endure the ordeal our team experienced.

Challenges

Sandbox access

Getting a sandbox required us to sign up for a yearly plan on SharePoint and provide a registration number that needed verification.

Our registration number did not work for some reason, and we had to jump through hoops to find one that did. It took us about a day to get the account approved.

Integration works but it doesn't

While the integration was working smoothly for one customer, allowing them to perform all actions, it did not work as intended for another customer. This is because account configurations can vary between customers, leading to new errors based on the specific configuration.

The whole fiasco around permissions

To retrieve documents from SharePoint, we need to follow a hierarchy and call the endpoints in this order: sites > drives > drive items.

Following this hierarchy, one might think that adding the owner of a SharePoint site should grant access to everything on that site. However, it isn’t that simple.

The user who connected was the owner of the site and the admin of the account. Despite being an admin, the user was unable to retrieve private sites. This was clearly a bug on SharePoint’s end. After trying multiple solutions, such as manually reindexing the sites and adjusting various permissions, we couldn’t determine the underlying issue.

We added the necessary scopes but nothing changed. The SharePoint documentation did not explicitly mention that the owner of the site also needs to be added as a member for each site separately. Our team had to hack their way into finding if this could solve the issue for this specific customer.

While this worked for this customer, we aren’t certain it will work for others. However, with the wealth of experience our team has gathered from working on this integration for multiple customers, we expect the next one to be easier to troubleshoot.

Our support process

Thanks to our Slack-based support, our customer was able to notify us promptly about this issue, allowing our team to troubleshoot it with the end-user over a Slack huddle.

Build a SharePoint integration in two minutes

Our SharePoint integration is battle-tested and covers most use cases. When you build the SharePoint integration with Truto, you leverage all of our experience. This helps improve your engineering and support operations, and most importantly, enhances your customer's experience.

Speak with us, and we’ll get you set up with Truto in 30 minutes.

Few things to know

If you are still inclined to build this on your own, here are some things to keep in mind:

  • The Graph API doesn’t yet support 100% of SharePoint.

  • The original REST API should help you do everything you need. We mainly used the Graph API since it’s more mature and modern. It helps us achieve what we need for our unified API, which is to get content on all the SharePoint sites, all files from the drive items, including users.

  • To get access to all the users who are part of a SharePoint site, it wasn’t obvious that a group is created for each SharePoint site. You can use the group members endpoint in the Graph API to get the members of a site.

  • The groups API, for some reason, did not expand the site in the response. So, we had to manually fetch each group matching the site’s name and then get the members out of that site.

  • There are two different sets of APIs: the REST API and the SharePoint Graph API, if you want just the content.

FAQ

What are the main challenges when building a SharePoint integration?
Key challenges include difficult sandbox provisioning, navigating complex site-drive-item permission hierarchies, and addressing inconsistencies where account configurations vary between users.
Should I use the Microsoft Graph API or the original SharePoint REST API?
While the Graph API is more modern, it does not yet support 100% of SharePoint features. The original REST API may be necessary for tasks that Graph cannot currently handle.
How do you get a list of members for a specific SharePoint site?
You can use the group members endpoint in the Graph API, though you may need to manually fetch the group matching the site's name as the groups API may not automatically expand the site in the response.

More from our Blog