Qlik Community

Knowledge

Search or browse our knowledge base to find answers to your questions ranging from account questions to troubleshooting error messages. The content is curated and updated by our global Support team

Announcements
Support Case Portal has moved to Qlik Community! Read the FAQs to start exploring Support resources.

How to: Getting started with Microsoft Onedrive/Sharepoint in Qlik Application Automation

MarkGeurtsen
Support
Support

How to: Getting started with Microsoft Onedrive/Sharepoint in Qlik Application Automation

Within the available connectors in Qlik Application Automation are Microsoft Onedrive & Microsoft Sharepoint . This article intends to describe some potential use cases that can be performed through the use of these connectors and provide an easy to use template to do so. Most examples are built using the Onedrive connector, however the same use cases can be performed for shared drives using the Sharepoint connector.

  • Monitoring changes to a user's drive.
  • Automatically modifying file locations and renaming of files
  • Create sharing links for files and share with emails
  • Set up sharing permissions for files.

Authentication for the connector happens with oAuth2. We are making use of the following scopes for the Onedrive connector:

  • Files.ReadWrite.All
  • User.Read
  • offline_access

These scopes should be accessible for all users in a default Office 365 tenant. If you are having troubles attempting to authorize Qlik Application Automation to obtain these scopes consult your Office 365 administrator.

Monitoring changes to a user's Onedrive

Using Automations in Qlik Cloud it is possible to monitor changes to a user's personal Onedrive or to a Sharepoint shared drive. When changes to a personal or shared drive happen, automatic actions can be performed, such as automatically obtaining data from an uploaded excel spreadsheet and updating a Qlik Sense app.

Onedrive makes use of a delta token to view changes that have happened since that token. As we do not have a data store within Automations, we are bound to use a separate store for the delta tokens. Options could be an excel file / text file stored on Onedrive, an app on Qlik Sense or any other place where data is persisted.

An example automation to monitor changes might look like the following. The automation is also added as JSON to the article to import into a Qlik Cloud tenant.

MarkGeurtsen_0-1632309118968.png

Modifying file locations and renaming files


The Microsoft Onedrive and Microsoft Sharepoint connectors in Qlik Application Automation provide blocks to Move and Rename items on drives. These can be used for example in conjunction with other connectors to perform these actions whenever … happens

An example could be to move all files from an incoming folder to an archive folder after a Qlik Sense reload is complete.
A simple example automation is added as an attachment to this article. In the automation editor this might look like the following:

MarkGeurtsen_1-1632309159889.png

 

Create sharing links for files and share with emails

The block Create Sharing Link can create a shareable URL that can be send over email to a user.
It offers the user the choice whether the URL works for the organization of the user or anonymous. The scope can be set to view, edit or embed and it is possible to provide a password as well as an expiration time for the shareable link.

The following automation would obtain data from a table in Qlik Sense, copy the rows to an Excel file hosted on Onedrive, create a shareable link and share this link to a user by email:

MarkGeurtsen_3-1632309304122.png

 

Setup sharing permissions for files

Sharing permissions can be done with the Send Sharing Invitation. This block sends an invitation to an email recipient including a message, subject, reading or writing permissions and the choice if an invitation has to be sent out and whether a user has to be signed in. A password can also be provided, but only if the user is using a personal Onedrive account.

Furthermore it is possible to list sharing permissions, updating these permissions and removing permission to access a file on a user's Onedrive.

The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.

Labels (1)
Attachments
Version history
Revision #:
2 of 2
Last update:
‎2021-09-22 10:44 AM
Updated by:
 
Contributors