How can we help you today?

Connection Type: Microsoft Graph API

Use the ShortPoint Microsoft Graph API connection type to display dynamic content from Microsoft 365 applications, SharePoint sites, and other sources through the Microsoft Graph API. It enables you to integrate live Microsoft 365 data directly into your SharePoint sites without writing code. Most importantly, it provides a user-friendly interface for connecting to Microsoft Graph endpoints.


Microsoft Graph API is a unified endpoint that provides access to data and services across the Microsoft 365 ecosystem, including SharePoint, Teams, Outlook, OneDrive, and Azure Active Directory. It allows applications and integrations to retrieve, update, and interact with organizational data through a single, standardized REST API interface.


This article walks you through using the ShortPoint Microsoft Graph API connection, exploring its key features, and applying practical use cases you can implement immediately to build or enhance your SharePoint pages.


Important!
This feature will be released in version 8.6.0.0 for SharePoint Online and is not currently available.

TABLE OF CONTENTS


Prerequisites

  • You have ShortPoint SPFx version 8.6.0.0 or later installed on your Microsoft 365 SharePoint site. This feature is not available for SharePoint 2019 and SharePoint 2016/2013 On-premises environments.
  • You have enabled the ShortPoint - Azure AD Services Proxy SPFx app, approved API access permissions, and established Microsoft Graph integration on your SharePoint site. If you haven't done this yet, please refer to our article on How to Enable Microsoft Graph Integration for MS Graph API Connections.
  • You are a ShortPoint Designer with an active license.

Interactive Tutorial

Follow this interactive tutorial to learn how to use the ShortPoint Microsoft Graph API connection:


Explore the Features section to learn about customization options, and visit the Use Cases section to discover common applications for this connection.


Step-by-step Tutorial

There are two ways to enter Microsoft Graph API queries. Follow the option that best suits your needs:


Option 1: Using a Pre-defined Use Case Query

The ShortPoint Microsoft Graph API connection provides a list of commonly used queries you can readily use. Follow the steps below to learn how to use them:


Step 1: Edit the ShortPoint web part

  • Open your SharePoint page and click Edit
  • Select the ShortPoint web part
  • Press the Edit Properties button


edit the ShortPoint web part


Step 2: Switch to Grid Mode

ShortPoint Connect is currently only available in Grid Mode.

  • Go to the ShortPoint Actions Toolbar
  • Click Switch to Grid Mode

switch to Grid Mode


Step 3: Edit ShortPoint Design Element

  • Navigate to the Design Element you want to connect
  • Open the settings window by clicking the cogwheel icon


open the Design Element settings window


Note: If you haven't added a Design Element to connect yet, you can insert one by clicking the plus button.



Step 4: Select Microsoft Graph API connection

  • Switch to the Connect tab
  • Choose the Microsoft Graph API connection type


choose Microsoft Graph API connection


Note: If you haven't enabled the Microsoft Graph API connection yet, follow the steps in our article How to Enable Microsoft Graph Integration for MS Graph API Connections .



Step 5: Select a Use Case

  • We've provided a library of common Use Cases that you can easily select and apply as needed. Use the [1] tabs to find the Use Case you want to use, or use the [2] search bar:

tabs and search bar


  • Select the Use Case that best matches your desired results. For this guide, we'll use Channels of a Team, which will pull all the channels of a specific team.
  • (If required) Some use cases require additional parameters. To get it, click Get Parameter:


Get Parameter

  • Then, use the arrow icons to look for the specific parameter you need and copy it:


get required parameter

  • Click Go Back:


Go Back

  • Paste the copied parameter in the field provided:


paste copied parameter

  • Hit Run query:

Run Query


  • After running your query, you'll see the result under Response Preview. You can browse through it using the arrow icons or toggle on the JSON option to see the results in JSON format:

 


TIPYou can explore additional use cases and their practical applications in the Use Cases section



Step 6: Connect

  • (Optional) Configure connection settings and performance caching options. You'll find details about these in the Features Section below.


other connect settings


  • Once satisfied, hit the Connect button:


Connect


You'll know your connection is properly established when the banners turn green and show a successful connection.


successful connection



Step 7: Map items to display

You can now select which data property from the query results you want to display on the Design Element.

  • Switch to the Items tab
  • Delete default content
  • Click the link icon and map any property that you want into each available field


In our example, we mapped the following fields and selected an icon:

  1. #displayName in the Title field - shows the names of the channels as the titles
  2. #createdDateTime in the Subtitle field - shows the date the channels were created as subtitles.
  3. #webURL in the Link field - redirects user to the Teams channel.


For more information about mapping results, see our ShortPoint Connect: Basic Tutorial article.


Step 8: Update and save

  • (Optional) Click Preview to see how the contents of your Design Element will appear
  • Once satisfied, apply your changes by hitting Update or Insert
  • Do not forget to hit Save and publish your page


Congratulations! You now know how to use the ShortPoint Microsoft Graph API connection. You can explore more use cases in the Use Cases section.


sample connected Design Element


Option 2: Using a Custom Query

The ShortPoint Microsoft Graph API connection allows you to enter your own queries. Follow the steps below to learn how.


Step 1: Edit the ShortPoint web part

  • Open your SharePoint page and click Edit
  • Select the ShortPoint web part
  • Press the Edit Properties button


Edit the ShortPoint web part


Step 2: Switch to Grid Mode

ShortPoint Connect is currently only available in Grid Mode.

  • Go to the ShortPoint Actions Toolbar
  • Click Switch to Grid Mode

switch to Grid Mode


Step 3: Edit ShortPoint Design Element

  • Navigate to the Design Element you want to connect
  • Open the settings window by clicking the cogwheel icon


cogwheel icon


Note: If you haven't added a Design Element to connect yet, you can insert one by clicking the plus button.

Step 4: Select Microsoft Graph API connection

  • Switch to the Connect tab
  • Choose the Microsoft Graph API connection type


select Microsoft Graph API

NoteIf you haven't enabled the Microsoft Graph API connection yet, follow the steps in our article How to Enable Microsoft Graph Integration for MS Graph API Connections.

Step 5: Enter Custom Query

  • Select Custom Microsoft Graph API Query:


Custom Microsoft Graph API Query


  • Enter your query in the Microsoft Graph API field and click Run query:

enter and run query


  • After running your query, you'll see the result under Response Preview. You can browse through it using the arrow icons or toggle on the JSON option to see the results in JSON format:


response preview


Step 6: Connect

  • (Optional) Configure connection settings and performance caching options. You'll find details about these in the Features Section below.


other connect settings


  • Once satisfied, hit the Connect button:


Connect


You'll know your connection is properly established when the banners turn green and show a successful connection.


successful connection


Step 7: Map items to display

You can now select which data property from the query results you want to display on the Design Element.

  • Switch to the Items tab
  • Delete default content
  • Click the link icon and map any property that you want into each available field


In our example, we mapped the following fields:

  1. #displayName in the Title field - shows the names of the users as the titles.
  2. #jobTitle in the Subtitle field - shows work titles as subtitles.
  3. #department in the Description field - shows departments as description.



For more information about mapping results, see our ShortPoint Connect: Basic Tutorial article.


Step 8: Update and save

  • (Optional) Click Preview to see how the contents of your Design Element will appear
  • Once satisfied, apply your changes by hitting Update or Insert
  • Do not forget to hit Save and publish your page


Congratulations! You now know how to use the ShortPoint Microsoft Graph API connection.


sample connected Design Element


Microsoft Graph API Features

The Microsoft Graph API connection offers the following features:


Use Cases

This section provides a curated library of common scenarios where the Microsoft Graph API can retrieve data and display it on your page. Learn how to Get Started with Use Cases.


use cases feature


Other Settings

  • Date/Time Format - lets you customize how dates and times are displayed. For more details, see How to Use Custom Date and Time Formats with ShortPoint Design Elements.
  • Flatten Results - lets you simplify complex data structures by removing nested layers, making the data easier to work with.
  • Items Limit - lets you set the maximum number of items displayed in your Design Element.


other connection settings


Advanced Settings

  • Enable Advanced Settings - displays advanced settings when you toggle this switch on.

advanced settings toggle

  • Custom headers - You can append custom header parameters using JavaScript. For example, you can pass "origin" to allow Cross-Origin Resource Sharing (CORS) for your service. Learn more about the Custom Headers function.

custom headers

  • Change Parameters - You can pass parameters to the URL with JavaScript. For example, you can pass the logged-in User ID. Learn more about the Change Parameters function.

change parameters

  • Change Path - You can modify the Service URL Path using JavaScript. For example: https://service.com/sales, where "sales" changes dynamically based on the logged-in user's department. Learn more about the Change Path function.

change path

  • Map Results - If your API doesn't return an array of result items (which ShortPoint expects), use this function to transform the data into the proper format for ShortPoint. Learn more about the Map Results function.

map results


Performance and Caching

Enable Partial Loading - This feature comes enabled by default. When the connection returns more than 20 results, partial loading activates automatically. Additional results will load as the user scrolls. Learn more about the Partial Loading function.

partial loading feature

Cache Options - choose from the following:

  • Smart Cache+ (Recommended) - This feature allows the element to load quickly from cached data. Once the page finishes loading, it automatically fetches and displays the most recent data in the background.
  • Cache for a Set Period of Time - This option lets you specify how long to keep cached data. The cached data will be displayed until the set time period expires, after which the latest data will be retrieved.
  • Disable Caching - This option disables all caching on your page, which means the page will always fetch fresh data directly from the source.

Learn more about these caching options and how to improve ShortPoint performance on your SharePoint sites.

caching options


List of Common Use Cases

The Microsoft Graph API connection type offers numerous applications for SharePoint pages. Here are detailed tutorials for the most common use cases.


USERS


EVENTS


GROUPS


TEAMS


Related articles:

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

World's best intranet sites are designed using ShortPoint

Get started today! Learn more
See all 19 topics

Start a trial

Ignite your vision. Install ShortPoint directly on your site, or play in sandbox mode. No credit card required.

Get started today

World’s best intranet sites are designed using ShortPoint

Thousands of companies using ShortPoint everyday to design, brand and build award winning intranet sites.

Get started Learn more