cancel
Showing results for 
Search instead for 
Did you mean: 

Getting user information with GRAPH API

ReemaKasliwal1
Level 3
Hi,

We have recently shifted to OAuth for SharePoint file upload and download and doing it via GRAPH APIs
I am trying to upload  a file to share point folder and if the file is locked/opened by some other user , it gets error message "resource locked", as shown below.


Error Message: {"error":{"code":"notAllowed","innerError":{"code":"resourceLocked"},"message":"The resource you are attempting to access is locked"}}

however it does not return which user has locked the file/resource in HTTP error response.
is there any way to get this information ?

we are using the VBO 'Microsoft Graph - SharePoint Upload Session'

Thanks in Advance.
1 REPLY 1

ewilson
Staff
Staff
Hi @ReemaKasliwal1,

There's no action for this in the current Graph connectors on the DX, but as I understand it this capability does exist within the Graph API. From what I've read, you can use the OData capabilities of Graph to get a list of the activities that have been performed on a file. If the file is locked, that will include information about who locked it and when. See the following Stack Overflow thread for more details:

https://stackoverflow.com/questions/51606008/ms-graph-rest-api-checkout-user

Cheers,
Eric​​