(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
- There is more than one way to create an access token.
For more information, refer to Access Token for OneDrive.
Procedure
- In AgilePoint NX, open the access token configuration screen
for OneDrive.
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
- In a new web browser tab, sign in to Microsoft Azure Portal with a Microsoft Account:
Procedure
- On the Microsoft Azure screen, in the Azure services section, click Azure Active Directory.
- On the navigation pane, in the Manage section, click App registrations.
- On the App registrations screen, click New Registration.
- 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.
- On the Supported account types section select the value that is associated with your OneDrive account type.
- Click Register.
The AgilePoint NX Sales Invoice App screen shows the client ID.
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
- 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.
- In a different web browser tab, in AgilePoint NX, open the OneDrive access token configuration screen.
Procedure
- In OneDrive, hover your cursor over the Application (client) ID field, and click Copy to clipboard.
- In AgilePoint NX, on the OneDrive Access Token Configuration screen, in the Client ID field, paste the Application (client) ID value from OneDrive.
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
- In one web browser tab, in AgilePoint NX, open the OneDrive access token configuration screen.
- 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
- In AgilePoint NX, on the OneDrive Access Token Configuration screen, in the Redirect URL field, copy the value.
- In OneDrive, on the AgilePoint NX Sales Invoice App screen, click Authentication.
- 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.
- In the Redirect URI field, paste the Redirect URL value from AgilePoint NX.
- Click Save.
Step 5: Configure the Client Secret for the OneDrive App
Next, configure the Client secret for your OneDrive app.
Procedure
- In the right side, click Certificates & secrets.
- On the Certificates & secrets screen, click New client secret.
- In the Description field, enter Client Secret ID.
- Click Add.
The client secret shows.
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
- 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.
- In a different web browser tab, in AgilePoint NX, open the OneDrive access token configuration screen.
Procedure
- 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.
- In AgilePoint NX, on the OneDrive Access Token Configuration screen, in the Client Secret ID field, paste the Client Secret ID value from OneDrive.
Step 7: Configure the Permissions for the OneDrive App
Next, configure the permissions for your OneDrive app.
How to Start
- On the App registrations section, open the app you created in OneDrive.
For more information, refer to Create an App in OneDrive.
Procedure
- On the AgilePoint NX Sales Invoice App - Certificate & secrets screen, in the Manage section, click API permissions.
- On the Configured permissions screen, click Microsoft Graph.
- On the Request API permissions screen, click Directory.
- On the Directory tab, select these checkbox:
- Directory.AccessAsUser.All
- Directory.Read.All
- Directory.ReadWrite.All
- On the Request API permissions screen, click Files.
- 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
- On the Request API permissions screen, click User.
- 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
- Click Update permissions.
Step 8: Complete the AgilePoint NX Access Token
Next, complete the AgilePoint NX access token configuration for OneDrive.
How to Start
- In AgilePoint NX, open the OneDrive access token configuration screen.
Procedure
- In AgilePoint NX, on the OneDrive Access Token Configuration screen, in the Token Name field, enter a name for the access token.
- Click Get OAuth2 Access Token.
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.
The OneDrive access token screen shows the OAuth 2.0 access token in the OAuth 2.0 Access Token field.
- Click Done.