Api to check whether tagged user have write permission to access the sharepoint/oneDrive file - permissions

I trying to develop #mention feature for microsoft teams web app. I have userId and iteamId but couldn’t figure out which api should i use to fetch whether tagged user have desired permission or not.
I used /users/{userId}/drive/items/{itemId}/permissions graph api but got access denied though that user have access

Related

Google Drive API: The user does not have sufficient permissions for this file using API Key

I'm trying to integrate Google Drive using the SDK with my app written in VB.Net using API Key and I'm following this tutorial https://developers.google.com/api-client-library/dotnet/get_started#simple
What happens is that when calling the ExecuteAsync method, I receive back an Exception saying that the user does not have sufficient permissions for this file.
Basically, I only have the API key (with restriction to access only Google Drive API) and I don't want to ask the user for permissions, because I'd like to use a specific account (so everyone would be sending files to that account).
I couldn't find a way to "link" this API Key to a specific account also.
I ended up using a service account for the Google Drive API.
The idea here was quite simple, where I created this account and downloaded a generated JSON file that is used by the SDK to Authenticate and call the API.
With this service account, I didn't use the API Key and I could leverage Permissions
and set permissions to each user on each created folder.

Authentication with Vue.js | Flask-RESTful and Google Sign-In

I am still a newcomer to both the Vue.js as well as the Flask framework. I have created a simple todo app that consumes JSON endpoints from Flask and uses Vue.js to display the UI.
My app has a TODO, PROJECT and USER model. I have successfully implemented a "normal login" through my own user model. The flow for this one:
The user fills in username and password.
POST request to Flask API that saves the user with a hashed password in the database.
The user can log in through an /auth endpoint and receives a JSON web token in return.
When the user logs out, the token is destroyed.
Now I want to implement a google sign in along with the existing user model. I could successfully create a call to the google API and have retrieved the user data from google in the vue.js client. But this is where I am stuck.
What should I save in my database now? I don't have a password for the user, but only a token to identify later when I have sent the data to the Flask server.
Should I save both Google Auth users and the normal users in the same database table? How can I differentiate between them when I retrieve their information to check if the user exists?
As I am very concerned about building safe applications in the future, I would like to really understand what the best practice in such a situation is.
Thanks for your help!
For anyone interested in this topic: I ended up saving all users in the same database table and created a boolean whether the user was logged in with a password/username or with an OAuth provider. If so, the provided token could be used to verify the user.

Invite People to folder with Onedrive for Buisness RESTful API

I'm using the onedrive RESTful API to integrate a webapp and share file between a group of people. I manage to correctly authenticate a user and get its access token, create folders and upload files.
The problem I'm having is finding a way to invite people to a folder. The closest documentation I have found is about permissions, where it talks about updating permissions (read, write, creating links) however I cant get a way to invite a specific user to a folder like its done directly in the One drive official webapp OneDrive Invite people to folder img
We don't officially support adding permissions through OneDrive API yet. If you need to do this in a production environment right now you'd need to use the SharePoint REST API to add the user permissions.
In the near future we'll be adding an invite function to the OneDrive API. While we haven't released documentation on it yet, you can see the unofficial syntax for it by looking at the service metadata information for the consumer service (https://api.onedrive.com/v1.0/$metadata). Of course, usage of this API would not be supported until it is documented on dev.onedrive.com though.
-Ryan

Access google drive files via api without logging in?

I am trying to make a webpage that can display information about documents on my google drive. For example I would like to display the titles of all my google documents on a webpage. I don't want the user to have to be logged into a google account, and I don't want to have to authorize anything (or the user to authorize anything). I just want the user to be able to see what I display - in a read only format - when they navigate to the page. The user will have no chance to edit or upload or delete anything, they can just view the info I display.
Is there a way to get files from google drive (via the API or any other way) possibly without using oauth 2.0? I've looked through the api docs and even coded up the sample apps, but all of them have a step that says, "Go to this URL, click Allow, enter the code" then you get access. These steps shouldn't be necessary. I just want to download the file and be able to manipulate it (either in memory or as a stream) then display something about it.
Also, I may misunderstand how OAuth 2.0 works so if that seems like the case, any helpful information would be much appreciated. Thank you.
You don't need to authenticate your visitors into Google, but need to authenticate yourself, so your web app can retrieve data from your personal Drive.
Get an access token and refresh token for yourself, store them and autenticate your requests. If you're using one of our client libraries, most of them refresh the access tokens once they are expired. See Using OAuth 2.0 for Web Server Applications for more details and OAuth 2.0 Playground helps you to understand how to get these tokens.

Does LinkedIn provide an API for offline access?

I am working on a a rails project based on social media networks. Is there any sort of offline access available for LinkedIn? That is, I am creating a application where I need to post links to the user's LinkedIn wall even when the user is offline. Can anyone guide me in this with an sample?
you can store the access token that a user generates when they authorize your application and then use it to create your posts/shares when users are not logged in