Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MicrosoftGraph querying for @microsoft.graph.downloadUrl returns character '@' is not valid

I have problem querying for "@microsoft.graph.downloadUrl" using microsoft graph endpoint. Running a query like this:

https://graph.microsoft.com/v1.0/me/drive/root/children?$select=id,name,file,folder,size,lastModifiedDateTime,@microsoft.graph.downloadUrl

Returns a bad request error with message: "Syntax error: character '@' is not valid at position..." I had not such a problem with OneDrive direct endpoint so I am wondering how exactly should I run the intended query?

like image 463
user2338914 Avatar asked Aug 04 '17 08:08

user2338914


1 Answers

Earlier this year the attribute @content.downloadUrl was renamed to @microsoft.graph.downloadUrl.It looks like there is an issue/discrepancy between the attribute's name in the results verse the query parameters.

The $select clause is still looking for the original name. As best I can tell, this isn't documented at the moment. That said, this query should do the trick for you:

/me/drive/root/children?$select=id,name,file,folder,size,lastModifiedDateTime,content.downloadUrl

like image 81
Marc LaFleur Avatar answered Nov 09 '22 20:11

Marc LaFleur