Search code examples
azure-active-directorymicrosoft-graph-apionedrive

How to get the download URL onedrive graph api?


Could you please let me know why this does not work? http://graph.microsoft.com/v1.0/me/drive/items/%3CitemId%3E?$select=id,name,@microsoft.graph.downloadUrl it retrieves the id and name but not the downloadUr.


Solution

  • Sorry for late reponse,this is a known issue of Microsoft Graph API. For your requirement,use content.downloadUrl instead of @microsoft.graph.downloadUrl, just try this :

    https://graph.microsoft.com/v1.0/me/drive/items/<item id>/children?$select=content.downloadUrl,id,name
    

    Result : enter image description here