Using the WPO365 RESTful API for Microsoft Graph


Using the WPO365 RESTful API for Microsoft Graph, you as a developer can develop a Gutenberg Block for WordPress using the wealth of data Microsoft 365 services such as SharePoint Online, OneDrive and Microsoft (Office) Graph make available.

The WPO365 RESTful API for Microsoft Graph is good news for developers.

  • As a developer you can now build client-side Microsoft 365 apps for WordPress.
  • Even better, you can do so in your favorite programming language.
  • And last but not least, you can do so without the hassle and complexity of implementing authentication and authorization because the WPO365 | LOGIN plugin takes care of all of that.


This API will supersede the first release Pintra Framework (Pintra-Fx) that was published over 3 years ago and that provided a very simple but robust client API to get access tokens needed to build apps for WordPress that support Microsoft 365 scenarios, spanning across productivity, collaboration, education, people and workplace intelligence, and much more.
An important difference and improvement between the initial version of Pintra-Fx and the Pintra RESTful API is that the new API does not provide access tokens to the client application. Instead it receives a query for Microsoft Graph, looks up or retrieves the necessary access token for the requested scope, forwards the query to Microsoft Graph and finally and transparently returns the response to the client application.


  • Full support for client-side Microsoft 365 – e.g. SharePoint Online and Microsoft Graph – development.
  • Developers can simply enqueue their resulting JavaScript file e.g. by adding a simple action to the WordPress (child) theme's functions.php file or a simple custom plugin file.
  • A very simple but robust client API to transparently interact with the Microsoft Graph API from WordPress.
  • Easy integration with Microsoft 365 data through Microsoft Graph.
  • It runs in the context of the current user and connection in the browser. There are no iframes for customization, authentication and authorization.
  • It is framework-agnostic.
  • A developer can choose his / her own favorite toolchain. There are no dependencies on any packages whatsoever.
  • Performance is reliable.

Getting started

The easiest way to get started with your own WPO365 RESTful API for Microsoft Graph project is to download the sample project from the Github repository.

The sample project, when built, is a plugin that enqueues a Gutenberg Block for WordPress to display the logged-in user's recently viewed documents (but only when the user logged in with Microsoft / Single Sign-On as provided by the WPO365 | LOGIN plugin).

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us