(Example) How to Get the Access Token Credentials from SharePoint for Microsoft 365

To get the access token credentials from SharePoint for Microsoft 365, do the procedure in this topic.

Background and Setup

Other Examples

Prerequisites

  • 2 self-signed certificates in PFX and CER format.
    • PFX - The file must be in .pfx format and requires a password.
    • CER - The file must be in .cer format.

    For help creating a self-signed certificate, contact AgilePoint Professional Services.

  • These access rights for AgilePoint NX Portal:
    • Enable Manage Center Access
    • Add, Remove, And Modify Global Application Resources

    For more information, refer to:

  • A SharePoint site in SharePoint for Microsoft 365.
  • Credentials with one of these permissions for Microsoft Azure:
    • microsoft.directory/applications/createAsOwner
    • microsoft.directory/applications/create
  • One of these Microsoft 365 account types:
    • Microsoft 365 Business
    • Microsoft 365 Enterprise

Good to Know

  • This example shows how to create an access token for SharePoint for Microsoft 365. This topic does not apply to SharePoint on-premises.
  • This example shows how to create the SharePoint access token with OAuth 2.0 Authentication using the Azure AD App Only option.
  • OAuth 2.0 access tokens require a 2-way exchange of credentials between AgilePoint NX and the external service. This means that you must get the credentials from the third-party service to paste in the AgilePoint NX access token, and get the redirect URI from AgilePoint NX to paste in the external service. This requires you to open both the AgilePoint NX access token and the third-party service at the same time, so you can copy and paste from one screen to the other.

    This topic shows the suggested procedure for SharePoint. The exact procedure for your access token depends on whether you already have a connection (usually called an app) configured in the external service.

  • This topic gives one example. The procedure may vary depending on your configuration and account settings in the third-party service.
  • Some information about third-party integrations is outside the scope of the AgilePoint NX Product Documentation. It is the responsibility of the vendors who create and maintain these technologies to provide this information. This includes specific business use cases and examples; explanations for third-party concepts; details about the data models and input and output data formats for third-party technologies; and various types of IDs, URL patterns, connection string formats, or other technical information that is specific to the third-party technologies. For more information, refer to Where Can I Find Information and Examples for Third-Party Integrations?

Step 1: Start Creating an Access Token in AgilePoint NX

First, create a new access token in AgilePoint NX for SharePoint.

How to Start

Procedure

  1. In AgilePoint NX, open the access token configuration screen for SharePoint.

    Box Access Token screen

    Do not configure the access token credentials.

    Keep the access token configuration screen open in AgilePoint NX, but do not save it.

Step 2: Create an App for SharePoint

Next, create an app in Microsoft Azure for SharePoint.

Prerequisites

  • Credentials with one of these permissions for Microsoft Azure:
    • microsoft.directory/applications/createAsOwner
    • microsoft.directory/applications/create

How to Start

  1. In a new web browser tab, sign in to Microsoft Azure Portal with Microsoft 365:

Procedure

  1. On the Microsoft Azure Portal screen, click App registrations.

    Click App Registrations
  2. On the App registrations screen, click New registration.

    Click New Registration
  3. On the Register an application screen, in the Name field, enter an app name.

    AgilePoint recommends you use an app name associated with your AgilePoint NX app or the way you want to use the app in AgilePoint NX.


    Enter Name
  4. On the Supported account types section select the value that is associated with your AgilePoint account.

    Select Account Type
  5. Click Register.

    Click Register

    The Employee Onboarding App screen shows the client ID and the tenant ID.


    Shows Client ID And Tenant ID

Step 3: Copy the Client ID And Tenant ID from the SharePoint App

Next, copy the client ID and tenant ID from the SharePoint App in Microsoft Azure to your AgilePoint NX access token.

Procedure

  1. In Microsoft Azure, to copy the client ID, on the Employee Onboarding App screen, hover your cursor over the Application (client) ID field, and click Copy to clipboard.

    Copy Client Id
  2. In AgilePoint NX, on the SharePoint Access Token screen, in the Client ID field, paste the Application (client) ID value from Microsoft Azure.

    Paste Client ID
  3. In Microsoft Azure, to copy the Tenant Name, hover your cursor over the Directory (tenant) ID field, and click Copy to clipboard.

    Copy Tenant Id
  4. In AgilePoint NX, on the SharePoint Access Token screen, in the Tenant Name field, paste the Directory (Tenant) ID value from Microsoft Azure.

    Paste Tenant ID

Step 4: Configure the Certificate for the SharePoint App

Next, configure the certificate for the SharePoint app.

Prerequisites

Procedure

  1. On the Employee Onboarding App screen, click Manage > Certificates & secrets.

    Click Certificates Secrets
  2. On the Certificates & secrets screen, click Certificates.

    Click Certificates
  3. On the Certificates tab, click Upload certificate.

    Click Upload Certificate
  4. On the Upload Certificate screen, in the Upload a certificate (public key) with one of the following file types: field, click Select a file.

    Click Select a file
  5. Select a certificate from the local machine.

    Select Certificate
  6. Click Add.

    Click Add

    The Certificates & secrets screen shows the certificate.


    Shows Certificate

Step 5: Configure the Permissions for the SharePoint App

Next, configure the API permissions for your SharePoint app.

Procedure

  1. On the Employee Onboarding App screen, in the Manage section, click API permissions.

    Click API Permissions
  2. On the API permissions screen, in the Configured permissions section, click Add a permission.

    Click Add a permission
  3. On the Request API permissions screen, in the Microsoft APIs tab, click SharePoint.

    Click SharePoint
  4. On the SharePoint section, in the What type of permissions does your application require? field, click Application Permissions.

    Enter Office 365 Exchange
  5. In the Select permissions section, select Sites.FullControl.All.

    Expand EWS Exchange Server
  6. Click Add Permissions.

    Click Add Permissions
  7. On the API permissions screen, click Grant admin consent for AgilePoint.

    Grant Admin Consent For AgilePoint
  8. Click Yes.

    Click Yes

    The API permissions screen shows the SharePoint permission.


    Added SharePoint Permissions

Step 6: Configure the Site Collection URL from the SharePoint Site

Next, configure the SharePoint site URL from SharePoint to your AgilePoint NX access token.

How to Start

  1. In one web browser tab, in SharePoint for Microsoft 365, open the SharePoint site.

    Open SharePoint Site
  2. In a different web browser tab, in AgilePoint NX, open the SharePoint access token configuration screen.

Procedure

  1. In SharePoint for Microsoft 365, on the SharePoint site, copy the URL for the SharePoint site.

    This is an example value. In a production environment, copy the actual Site Collection URL from SharePoint site.


    Copy Site URL
  2. In AgilePoint NX, on the SharePoint Access Token screen, in the Site Collection URL field, paste the URL value from SharePoint for Microsoft 365.

    Paste Site URL

Step 7: Complete the SharePoint Access Token

Next, complete the AgilePoint NX access token configuration for SharePoint.

Prerequisites

Procedure

  1. In AgilePoint NX, on the SharePoint Access Token Configuration screen, in the Token Name field, enter a name for the access token.

    SharePoint Access Token screen
  2. In the Certificate field, click Upload file.

    SharePoint Access Token screen
  3. Select a certificate from the local machine.

    Enter Client Id
  4. In the Certificate Password field, enter the password for the certificate.

    Enter Certificate Password
  5. Click Test Connection.

    Test Connection

    If the connection is successful, a confirmation message shows.


    Test Connection
  6. Click Save.

    Save Access Token