Are there APIs for classifying data on Office 365? Specifically OneDrive and Sharepoint Online? - onedrive

I am looking to build an application that among other things can connect to a customer's O365 account (using their admin credentials), get directory and file and folder info (metadata), classify the files to find sensitive data (like SSN, PII, etc) and remediate problems.
Is there any way - using APIs - to connect to OneDrive, apply a classification profile (for example , give a regular expression that matches SSN) and get a response with the list of files that match that criterion?
Put another way, how can I classify data on OneDrive?
Thanks,
- deepak

You can use Microsoft's Graph API to get the list of files.
You can see an example of using it in a project I wrote
https://github.com/maximrub/SharePointOnlineTasker
You can use the Graph API to get the files info (hashes, names, size and so on..) and you can also use it to download the content.
If you can classify by metadata only (file names etc'..) you won't need to download it

Related

Headers are not picking up from the Google sheet in Google big query

I am trying to upload a google sheet to my dataset in the google bigquery. Below are the settings
Uploading configuration snap
I have made the "Header rows to skip" = 1 and =0 as well
Result doesn't pick the header on the top. It shows "string_field_0"
Here is the file with just one header column and 3 values https://docs.google.com/spreadsheets/d/1mnYBiDe-eOauhVa5QbM-BRelW2iwlhQD9lPMR50A9Lk/edit?usp=sharing
What am I doing wrong?
I was getting the same error. Then I realized that I got it because all the columns are in string format. After adding a field in integer format the issue was resolved.
It is important to follow the steps from the official documentation.
We need to take care of:
Retrieving the Google Drive URI by getting shareable link.
Enabling Google Drive access, because accessing data hosted within Google Drive requires an additional OAuth scope. We can use following command to authenticate with Google Drive:
gcloud auth login --enable-gdrive-access
Check if we are granted with required permissions and scopes. Finally, we can create a table.
Keep in mind that for JSON or CSV files, you can check the Auto-detect option to enable schema auto-detect. Schema auto-detection in the web UI is not currently supported for Google Sheets (though it is available using the bq command-line tool and the API).
I hope you find the above pieces of information useful.

Need help in constructing Microsoft Graph API url

I am trying to access files from DocumentLibrarie (DL) available in SharePoint online using Graph API. As per Microsoft's Graph API documentation this needs to be done using {driveId}. To fetch the driveId i am using user-friendly DL name, as shown below:
https://graph.microsoft.com/v1.0/sites/{hostname}:/sites/{document library name}:/drives
and to access individual document sets, i will use the {driveId} that is obtained from the previous REST call. The url to fetch files from individual document sets is as below,
https://graph.microsoft.com/v1.0/drives/{driveId}/root:/{documentSetName}:/children
The driveId is not in user-readable form (its about 66 chars in length). I was wondering if it is feasible to achieve this using url below (or, something similar), essentially to use the document library name to access the files in Graph.
https://graph.microsoft.com/v1.0/sites/{hostname}:/sites/{document library name}:/drives/{documentSetName}:/children
Please let me if this is feasible. Also, do you see such an option has its utility.

Exporting a list of images from Google Photos or DropBox as CSV

Do any of the major online photo storage/sharing platforms offer a reasonable way to export a set of image URLs and titles as something like a CSV or fetch them as JSON from a REST API?
I am trying to get any sort of clean list of title, url value pairs for all the images in a particular folder or gallery.
Google Drive/Photos would be my prefered platform, but I would switch to DropBox or other service if I could easily get such an export list.
If you're going to use Google Drive, you'll probably end up using these properties from File Resource:
webViewLink - a link for opening the file in a relevant Google editor
or
webContentLink - a link for downloading the content of the file in a
browser.
You can fetch this properties using files.list or files.get.
For Dropbox, you would use the /2/files/list_folder[/continue] endpoints to list the desired files:
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue
Then, you can use /2/sharing/create_shared_link_with_settings to create shared links for the desired files:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-create_shared_link_with_settings
Or, to retrieve existing shared links, use /2/sharing/list_shared_links:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_shared_links
Those are links to the documentation for the HTTPS endpoints themselves, but we recommend using one of the official SDKs if possible:
https://www.dropbox.com/developers/documentation
Those have corresponding native methods for the HTTPS endpoints.

Qlikview - How users to see documents which are assigned to them

I have 10 qlikview app in AccessPoint and for specific user i want to show only 7 app.
I don't wont to use Section Access.
I use NTFS authorization
And on folder Production (where save qvw app for browser) in Properties Security i remove specific user but he still see app...
How can I handle this?
By your description it sounds like you are using publisher.
If you want to display certain QVW's to certain users, then you need to setup the distribution to "Named Users", that way you can only add users to the relevant apps and the people that are not named will not see the QVW on the accesspoint.
Also make sure on the actual QVW (right click on it, properties, security) that only the relevant people have security rights on the file.

How can i get file's properties for a file in OneDrive?

I am using the REST API for OneDrive. I have a name of a file in the users storage. I want to obtain the properties for this file. According the documentation file's properties can be retrieved
if you have the file ID.(http://msdn.microsoft.com/en-us/library/dn659731.aspx) So I need the file ID and the only way I see to obtain it is to search the whole storage which is really unnecessary.
Is there a way to find properties of a file(with a known name) with a single request to the service?
Ideally the API would support access by path which would do what you require (assuming you have the full path and not just the name). Unfortunately, to my knowledge that isn't supported.
There is a heavy handed approach that may work for you though - you can use the search capabilities of the API to find files with the name you specify:
GET /[userid]/skydrive/search?q=MyVideo.mp4
The documentation is available at the link below:
http://msdn.microsoft.com/en-us/library/dn631847.aspx