Configure Microsoft SharePoint Graph connection

  • Release version: Yokohama
  • Updated February 1, 2024
  • 3 minutes to read
  • Configure a Microsoft SharePoint Graph connection and a connection record that enable your ServiceNow instance to integrate with the Microsoft SharePoint using the Microsoft Graph.

    Before you begin

    • Request an Integration Hub subscription.
    • Activate the Microsoft SharePoint Online spoke.
    • Access to Microsoft Azure portal.
    • Create an OAuth application on Microsoft Azure portal.
    • Role required: admin.

    Procedure

    1. Configure a SharePoint Graph connection by adding permissions.
      1. Log in to https://portal.azure.com/.
      2. Select App registrations.
        App registration button.
      3. Select All applications or Owned applications.
        OAuth application selection options.
      4. In the search field, enter the name of the OAuth application you had created.
        To learn how to configure an OAuth application, see Configure OAuth application in Microsoft Azure.
      5. In the search results, select the name of the OAuth application you had configured.
      6. On the left panel, under the Manage heading, select API permissions.
        API permissions link.
      7. Under the Configured permissions heading, select + Add a permission.
      8. In the Request API permissions window, select Microsoft Graph.
        Microsoft Graph button.
      9. Select Delegated permissions.
      10. Under the Select permissions heading, enter site in the search field.
      11. Expand the Sites list.
        Sites list.
      12. Select Sites.FullControl.all, Sites.Read.All and Sites.ReadWrite.All.
        Microsoft SharePoint Online spoke Graph Site permissions.
      13. Under the Select permissions heading, enter User.read in the search field.
        Microsoft SharePoint Online spoke Graph User permissions.
      14. Select Add permissions.
        The permission is added.

        Permissions added.

      15. Optional: To grant admin consent, under the Configured permissions heading, select Grant admin consent.
      16. Optional: Select Yes.
        Admin consent is mandatory if the value under the Admin consent required column for the Sites.Read.All permission is Yes.
    2. Configure the Microsoft SharePoint Graph connection record.
      1. Log in to your ServiceNow instance.
        Note:
        The URL of the instance and that of the instance you had provided as the redirect URL must be the same.
      2. Navigate to All > Process Automation > Workflow Studio.
      3. Select the Integrations tab.
      4. In the Search all connections field, enter Microsoft SharePoint.
        Note:
        The Outbound tab is selected by default. Confirm that the Outbound tab is already selected.
      5. In the Search all connections field, enter Microsoft SharePoint.
      6. In the MicrosoftSharePointGraph tile, click View Details.
        View Details button on Microsoft SharePoint Graph alias.
      7. Click Configure.
        Configure button.
      8. On the form, fill these details.
        Field Description
        Connection Name The name of the connection record. The default and read-only name of the first connection record is MicrosoftSharePointGraph. To provide a custom name, you must create a connection record by clicking Add connection.
        Connection URL The URL to connect to the Microsoft Graph APIs. The URL is https://graph.microsoft.com/v1.0.
        OAuth Entity Name Name of the OAuth application that you created. To learn how to create an OAuth app, see Configure OAuth application in Microsoft Azure.
        OAuth Client ID Client ID that was generated when you created the OAuth app. To learn where to find the client ID, see Configure OAuth application in Microsoft Azure.
        OAuth Client Secret Client secret that was generated when you created the OAuth app. To learn where to find the client ID, see Configure OAuth application in Microsoft Azure.
        OAuth Authorization URL The URL must be in the format: https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/authorize?response_mode=query.
        Tip:
        To find the tenant ID, do the steps.
        1. Log in to https://portal.azure.com/.
        2. Under the Manage Azure Active Directory heading, select View.

          The tenant ID is available under the Basic information heading.

          Tenant ID.

        OAuth Token URL The URL must be in the format: https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token.
        Tip:
        To find the tenant ID, do the steps.
        1. Log in to https://portal.azure.com/.
        2. Under the Manage Azure Active Directory heading, select View.

          The tenant ID is available under the Basic information heading.

          Tenant ID.

        Token Revocation URL The URL must be in the format: https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token.
        Tip:
        To find the tenant ID, do the steps.
        1. Log in to https://portal.azure.com/.
        2. Under the Manage Azure Active Directory heading, select View.

          The tenant ID is available under the Basic information heading.

          Tenant ID.

        OAuth Redirect URL The URL must be in the format: https://<instance-name>.service-now.com/oauth_redirect.do.
        Microsoft SharePoint Graph connection form.
      9. Select Configure and Get OAuth Token.
    3. Click Configure and Get OAuth Token.
      The connection record is created.

      Connection created.

    4. To use the Microsoft Graph action, create a record in the Tenant table (sn_sp_spoke_tenant) on your ServiceNow instance.
      Note:
      After you configure and get OAuth token, an application registry record is created with the details you have provided. In this application record, do not select any OAuth API Script.