Question

I am trying to get all the files created by a specific user using userid.

The below REST url is what I am trying:

https://mydomain.sharepoint.com/_api/files?$select=Title,CreatedBy&$expand=CreatedBy&$filter=CreatedBy/Id eq '10'

But I am getting the below error:

{
    "odata.error": {
        "code": "-1, System.NotSupportedException",
        "message": {
            "lang": "en-US",
            "value": "Specified method is not supported."
        }
    }

}

When I use only $select and $filter I get the expected result.

But when I use $expand I am getting the above error.

Any help would be appreciated.

Was it helpful?

Solution 2

Finally I got the expected output using the below url.

https://mydomain.sharepoint.com/_vti_bin/ListData.svc/Documents?$select=CreatedById&$filter=CreatedById eq 12

OTHER TIPS

The $expand columns must also be included in $select

Marc has a sample: http://sympmarc.com/2014/01/21/getting-user-information-with-the-sharepoint-2013-rest-api/

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top