community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.

Tool Mastery | One Drive

Moderator
Moderator
Created on

One Drive_output.pngOne Drive_input.png

This article is part of the Tool Mastery Series, a compilation of Knowledge Base contributions to introduce diverse working examples for Designer Tools. Here we’ll delve into uses of the OneDrive Tools on our way to mastering the Alteryx Designer:

 

OneDrive is a file hosting and synchronization service operated by Microsoft. You can connect to a OneDrive instance in Alteryx with the OneDrive Input tool and the OneDrive Output tool.

 

The OneDrive tools do not come installed standard with Alteryx. To install them, you can find them here, or by searching for “OneDrive” in the Alteryx Gallery.

 

Connecting to OneDrive:

 

There are two different modes for authentication depending on whether the OneDrive account you'd like to connect to is Personal or for Business. For either form of authentication, you will have to register a new application with Microsoft (Azure) and create a Client ID. If the account type is business, you will also need to generate a secret key.

 

How to Create a registered application in Azure: 

 

1. Go to the Azure Application Registration Portal

2. When prompted, sign in with your account credentials.

3. Select "New Registration":

 

NewRegistration.png   

 

4. This will prompt you to enter a name for the application, the supported account types, and the redirect URI. Select either of the multitenant options (You may have to work with your Azure admin to determine which will be best for you) and enter https://login.live.com/oauth20_desktop.srf as the redirect URI. This is required for the OneDrive tools to connect. 

 

RegisterAnApplication.png

 

5. Once the app is created, an application ID will automatically be created. This is the Client ID that is used in Alteryx to login to the app:

FinishedRegistration.png

 

6. If you are using the application for a OneDrive Business account (organization account) you will need to generate a client secret. This will be entered as the Secret Key when logging in from the OneDrive tool in Alteryx:

 

NewClientSecret.png

 

Once you select "New Client Secret" a secret will be generated. Make sure to copy and paste this somewhere safe, as after you leave the page for the first time, the secret will be hidden. You can always generate a new secret if you lose it.

 

7. Next, you will have to set permissions for the application. You can access API permissions for the application from the application "overview page":

 

ViewAPIpermissions.png

 

There are three delegated permissions required to use the tool (Files.ReadWrite, User.Read, and offline_access). 

APIpermissions.png

 

Note* You can achieve necessary permission for the application by selecting other permissions as well. The permissions listed above are the bare minimum for the Alteryx tool to access OneDrive. 

 

 

After this is complete, you have everything necessary to log into the OneDrive tool in Alteryx. Additional information on registering an application with Azure can be found here

 

 

Logging in to the OneDrive tools in Alteryx:

 

Personal: For OneDrive Personal Accounts, you will only need to enter a Client ID:

 

OneDrivePersonalCred.png

 

Business: For OneDrive Business Accounts, you will need both a Client ID as well as a Secret Key that is associated with the application:

 

OneDriveBusinessCred.png

 

Authentication:

 

Once you provide the application credentials, A new window will pop up, and you will be prompted to log in to an account that has access to the OneDrive:

 

OneDriveAuth.png

 

Note* You will have to provide authentication for both OneDrive Input and Output tools, even if you are using them in the same workflow.

 

Once you complete the authentication, the configuration window for the tool will appear.

 

Configuring the OneDrive Input Tool:

 

The OneDrive input tool will allow you to choose multiple specifications for the file you wish to pull in:

 

OneDriveInputConfig2.png

 

 

 

Once you have made all of your selections, run the workflow to pull in the file from OneDrive.

 

 

Configuring the OneDrive Output Tool:

 

 

OneDriveOutputConfig.png

 

Once you have made all the selections that you wish, run the workflow to write data into OneDrive.

 

Troubleshooting:

 

"We're unable to complete your request" error after logging in:
UnableToCompleteYourRequest.png

-This usually means that you have entered your Client ID or Application Secret incorrectly. Makes sure that you have entered them correctly. 

-Also be sure that you have permissions to access the OneDrive.

_______________________________________________________________________________________________________________________

 

Error when reading in JSON: “list index out of range”

onedrivejson.png

Check to make sure that JSON formatting within the files is correct.

 

By now, you should have expert-level proficiency with the OneDrive Input and Output tools! If you can think of a use case we left out, feel free to use the comments section below! Consider yourself a Tool Master already? Let us know at community@alteryx.com if you’d like your creative tool uses to be featured in the Tool Mastery Series.

  

Stay tuned with our latest posts every Tool Tuesday by following Alteryx on Twitter! If you want to master all the Designer tools, consider subscribing for email notifications.

Comments
Meteor

This is super informative and helpful! I believe this may need to be updated because the Microsoft Application Registration Portal has been deprecated and Azure is the new site.

Meteoroid

I am getting an error when the One_drive tool tries to install.  It gets to the Collecting pip==19.0.3, but never gets past that point.

Moderator
Moderator

@CConwell  Certain environments can fail to install tools for a couple of reasons. It could be that we are unable to download the required packages when installing the tool due to proxy or firewall restrictions. It could also be an issue with permissions. I would recommend reaching out to support@alteryx.com so that our support team can dig into the specific reason that the tool installation is failing.

 

Thanks!

 

Jake