How can I use M/S Graph APIs to read Sharepoint lists - api

I see from other Users' questions that this used not to be possible but other research suggests it now might be; I'm using Graph Explorer and have started with this generic URL: https://graph.microsoft.com/v1.0/sites/{siteId}/lists/{listId}/. I'm logged in as a User who is an Owner of the Sharepoint site I'm going after. But so far, I have not been able to find, much less see the contents of any Lists that I know are there in the site. Q1: Is this even possible (now)? Q2: How - or - what am I missing?

Yes this is possible but the graph API doesn't rely on the permissions as defined on SharePoint and might explain why you are not seeing the lists you own via the graph api.
You will have to setup the necessary Azure AD permissions on your app to access SharePoint list and items via the graph api.
As shown below, i can read data from the specified list based on permissions already consented to.

Related

How to execute a Query/access sharepoint list in MS Project?

I need to populate my resource list in MS Project from a Sharepoint list. The authentication method for sharepoint is the windows credential/company credentials.
I was thinking by SOAP or a query already saved (this will be better since I have the processing Power query). What is the best way to do this?
This can actually be pretty interesting depending on how much access your SharePoint farm admin folks allow you to have.
SOAP is fine probably. But I've always used REST to access a SP List through SP's API. I've used this site: https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-rest-endpoints to great effect when creating and accessing lists from remote applications. Anything that can send an authenticated rest / generate a token with credentials should be able to get the LIST and even edit it.
One thing to remember among the many nuances of SP development is that list names are often different when accessing through SOAP or REST API points. You may need to figure out your own List naming conventions and any special character codes like underscore or spaces and their corresponding SP codes ((http://sharepoint.stackexchange.com/questions/787/finding-the-internal-name-and-display-name-for-a-list-column))
EDIT if you have power query, you can use the built in connect to sharepoint template in most Office Apps that feature PQ. That might be good, since it should allow you to save the credentials you have to get the SP without having to generate a token through SOAP or REST. But REST is my main experience here. I've used PQ in Excel to access SP list.

For Dropbox API is there a way to pull a list of users and see if MFA is enabled?

I am wanting to pull all users in my company dropbox and then check to see if their accounts have MFA enabled. I read over the documentation for Dropbox api but did not see anything stand out where this was possible.
It's very sad to realize that a popular platform such as Dropbox doesn't expose A LOT of basic features through its API (and the SDK itself is far from being OK, compared to G-Suite). Anyway, there are two hacky methods you can use in order to pull out that information (with some limitations).
First method:
By analyzing the team events using team_members_list() you can filter out tfa_change_status_details events. When new_value=TfaConfiguration('[sms|other]', None) is specified - 2FA is enabled.
The information I found out that can be retrieved using this method is:
has_2fa - whether 2FA was ever configured.
is_tfa_enabled - whether 2FA is currently enabled.
tfa_type - whether 2FA is by SMS or by app.
However, keep in mind that you have to track changes constantly and also keep in mind that Dropbox saves team events for only two years.
Second method:
Using the front-end dashboard API this information can be retrieved (I can't remember the API name, I think that it is /2/get_multifactor and inside you'd find some information about its status and the organizational policy regarding 2FA). However, to use the front-end dashboard API (which is totally undocumented) you'd need to simulate a successful login (and correctly use the lid and jar cookies) and you'd also need to bypass the random captcha that appears when you abuse the service with too many requests.
To be honest, Dropbox's API is weak, neglected, and ugly. I wish I never had to use it. Anyway, I would recommend using the first method and pray for a significant update to the API
No, unfortunately the Dropbox API doesn't expose this. We'll consider it a feature request.
There's a feature request open for this one (https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/MFA-status-for-users/m-p/468564#M23886). But I wouldn't hold your breath, as #Aviv mentioned the Dropbox API seems surprisingly neglected at the moment.

office 365 api generate a guest link for MyFiles

I am trying to access from an MVC application, the OneDrive files from my office 365 account.
What I need is to give my application user the possibility to edit a .docx file, in their browser.
I used Office 365 APIs Preview, to get the list of files, and their properties, but I don't know how to allow the user to edit that file in his browser.
A solution to this problem could be to share the file with different user of my application, by creating a guest link.
From the office365 portal this is a simple task:
- OneDrive, select the file -> manage -> share with -> get a link, the link can have read only or read write rights.
I don’t know how to create this link from the APIs.
Can you please tell me how can I generate this guest link or if there is a different solution to this problem.
In short, I don't think this can be done in a supported way.
There is a real risk that if you figure out the URL structure, that the structure could change. I suggest that you make a feature request by using UserVoice. It would be preferable that the REST API and the client objects construct this URL for you.
With that said, if you take the sharing link, and place it into a browser window, the link will redirect to Word Online with the document in the browser. Take a look at the structure of the URL in the Word Online browser window. You could use that as a template, and along with the information from the File.Url property from the Office 365 API Preview, you may be able to put together a URL to that file. Expect that this approach would not be supported and would be subject to URL structure changes.
If other people find that this would be a useful feature, please use UserVoice to let us know.

No projects listed with Maps Engine Lite API

I've set up API service account access and that seems to be authenticating and connecting OK using the provided sample code (https://developers.google.com/maps-engine/documentation/oauth/serviceaccount).
I've shared my map with the provided service account email address in the Google Maps Engine UI.
Accessing the API method https://www.googleapis.com/mapsengine/v1/projects I expected to see my map in a returned list of projects visible to the service account. Instead, only an empty projects array is returned.
Ultimately my goal is to access place name and geodata stored within a layer on the map I have created in Maps Engine Lite. Is there a step I have missed or something I have misunderstood about granting API access to a Maps Engine Lite map?
Did you progress with your question?. I got one project in the list but because I singed in for a free Google Maps Engine account. That allows you to créate just one project.
But I was looking for accessing "my places" maps.
It turns out certain features, such as the ones I was looking to use, are only available on the (paid for) Maps Engine, and not "Maps Engine Lite". The API is different.
When you mention that they are just available on the Maps Engine Pro (paid for) version, do you mean that the user who owns the maps has to upgrade or yourself, as a developer that want's to access user's maps, have?.
I wouldn't mind to pay (a reasonable price) for it in order to get my app working again. But I don't think most of my app's users would.
Could you check if it worked that way?

Skydrive sync REST API

I have read the docs for SkyDrive REST APIs but didn't find any API using which i can sync with the SkyDrive, without recursive polling the folders for update check.
Is there any API to get only the update for a user Drive?
A commonplace reality of epistemology is that...
It is typically much easier to prove that something exists than to prove that it does not exist
Never the less I can say with a high level of confidence that the official REST API for Skydrive doesn't include a way of getting a list of updated documents for synchronization purposes.
Furthermore I didn't see any evidence of a non-supported/non-official API that would serve this purpose and by observing the way the Windows Client for SkyDrive interacts with the server (within limit of fair-use reverse engineering), it appears that the synchronization is done by reviewing the directory tree rather than getting a differential list.
I believe the closes you can go is: Get a list of the user's most recently used documents
To get a list of SkyDrive documents that the user has most recently
used, use the wl.skydrive scope to make a GET request to
/USER_ID/skydrive/recent_docs, where USER_ID is either me or the user
ID of the consenting user. Here's an example.
GET http://apis.live.net/v5.0/me/skydrive/recent_docs?access_token=ACCESS_TOKEN