(Example) How to Get the Access Token Credentials from OneDrive

To get the access token credentials from OneDrive, do the procedure in this topic.

Prerequisites

  • One of these Microsoft account types:
    • Xbox
    • Skype
    • Outlook.com e-mail address
    • Hotmail.com e-mail address
  • One of these Microsoft 365 account types:
    • Microsoft 365 Home
    • Microsoft 365 Personal

Good to Know

  • 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 OneDrive. 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 OneDrive.

How to Start

Procedure

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

    OneDrive Global 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 in OneDrive

Next, create an app in OneDrive.

How to Start

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

Procedure

  1. On the Microsoft Azure screen, in the Azure services section, click Azure Active Directory.

    Microsoft Azure screen
  2. On the navigation pane, in the Manage section, click App registrations.

    Overview screen
  3. On the App registrations screen, click New Registration.

    App registrations screen
  4. 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.


    Register an application screen
  5. On the Supported account types section select the value that is associated with your OneDrive account type.

    Register an application screen
  6. Click Register.

    Register an application screen

    The AgilePoint NX Sales Invoice App screen shows the client ID.


    AgilePoint NX Sales Invoice screen

Step 3: Copy the Client ID from OneDrive App

Next, copy the client ID from the OneDrive app to your AgilePoint NX access token.

How to Start

  1. In one web browser tab, on the App registrations section, open the app you created in OneDrive.

    For more information, refer to Create an App in OneDrive.

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

Procedure

  1. In OneDrive, hover your cursor over the Application (client) ID field, and click Copy to clipboard.

    AgilePoint NX Sales Invoice screen
  2. In AgilePoint NX, on the OneDrive Access Token Configuration screen, in the Client ID field, paste the Application (client) ID value from OneDrive.

    OneDrive Access Token screen

Step 4: Configure the Redirect URI for the OneDrive App

Next, configure the Redirect URI in the OneDrive app that connects to your AgilePoint NX app.

How to Start

  1. In one web browser tab, in AgilePoint NX, open the OneDrive access token configuration screen.
  2. In a different web browser tab, open the OneDrive app configuration screen.

    For more information, refer to Copy the Client ID from OneDrive App.

Procedure

  1. In AgilePoint NX, on the OneDrive Access Token Configuration screen, in the Redirect URL field, copy the value.

    AgilePoint NX OneDrive Access Token screen
  2. In OneDrive, on the AgilePoint NX Sales Invoice App screen, click Authentication.

    AgilePoint NX Sales Invoice App screen
  3. In the Type field, select your application type.

    For AgilePoint NX apps, this value will often be Web, but it depends how your app is used.

    For more information, refer to the OneDrive documentation in Third-Party Vendor Documentation.


    AgilePoint NX Sales Invoice App screen
  4. In the Redirect URI field, paste the Redirect URL value from AgilePoint NX.

    AgilePoint NX Sales Invoice App screen
  5. Click Save.

    AgilePoint NX Sales Invoice App screen

Step 5: Configure the Client Secret for the OneDrive App

Next, configure the Client secret for your OneDrive app.

Procedure

  1. In the right side, click Certificates & secrets.

    AgilePoint NX Sales Invoice App screen
  2. On the Certificates & secrets screen, click New client secret.

    Certificates & secrets screen
  3. In the Description field, enter Client Secret ID.

    Certificates & secrets screen
  4. Click Add.

    Certificates & secrets screen

    The client secret shows.


    Certificates & secrets screen

Step 6: Copy the Client Secret from the OneDrive App

Next, copy the Client Secret from the OneDrive app to your AgilePoint NX access token.

How to Start

  1. In one web browser tab, on the App registrations section, open the app you created in OneDrive.

    For more information, refer to Create an App in OneDrive.

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

Procedure

  1. In OneDrive, on the Certificates & secrets screen, in the Client secrets section, for the value associated with the Client Secret ID for your app, click Copy to clipboard.

    Certificates & secrets screen
  2. In AgilePoint NX, on the OneDrive Access Token Configuration screen, in the Client Secret ID field, paste the Client Secret ID value from OneDrive.

    OneDrive Access Token screen

Step 7: Configure the Permissions for the OneDrive App

Next, configure the permissions for your OneDrive app.

How to Start

  1. On the App registrations section, open the app you created in OneDrive.

    For more information, refer to Create an App in OneDrive.

Procedure

  1. On the AgilePoint NX Sales Invoice App - Certificate & secrets screen, in the Manage section, click API permissions.

    AgilePoint NX Sales Invoice App screen
  2. On the Configured permissions screen, click Microsoft Graph.

    Configured Permissions screen
  3. On the Request API permissions screen, click Directory.

    Request API Permissions screen
  4. On the Directory tab, select these checkbox:
    • Directory.AccessAsUser.All
    • Directory.Read.All
    • Directory.ReadWrite.All

    Request API Permissions screen
  5. On the Request API permissions screen, click Files.

    Request API Permissions screen
  6. On the Files tab, select these checkboxes.
    • Files.Read
    • Files.Read.All
    • Files.Read.Selected
    • Files.ReadWrite
    • Files.ReadWrite.All
    • Files.ReadWrite.AppFolder
    • Files.ReadWrite.Selected

    Request API Permissions screen
  7. On the Request API permissions screen, click User.

    Request API Permissions screen
  8. On the User tab, select these checkboxes.
    • User.Export.All
    • User.Invite.All
    • User.Read
    • User.Read.All
    • User.ReadBasic.All
    • User.ReadWrite
    • User.ReadWrite.All

    Request API Permissions screen
  9. Click Update permissions.

    Request API Permissions screen

Step 8: Complete the AgilePoint NX Access Token

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

How to Start

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

Procedure

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

    OneDrive Access Token screen
  2. Click Get OAuth2 Access Token.

    OneDrive Access Token screen

    If you are not signed in to Microsoft Azure, the Microsoft Azure sign in screen opens in a new tab or window in your web browser. Sign in to Microsoft Azure with Microsoft account credentials. The new tab or window closes in your web browser.


    Microsoft Sign In screen

    The OneDrive access token screen shows the OAuth 2.0 access token in the OAuth 2.0 Access Token field.


    OneDrive Access Token screen
  3. Click Done.

    OneDrive Access Token screen