I'm trying to download a file located in a M365 site via the Graph API. If I reference the site via "hostname,siteID,webID", the request works via HttpClient, the Graph API SDK and Graph Explorer:
https://graph.microsoft.com:443/v1.0/sites/hostname.sharepoint.com,fe0f6782-2cc6-447a-938f-bf6a379ed791,133e22cf-9a72-4ff2-a700-c0accacdcc8d/lists/Documents/drive/items/017TIGYVRADE3TAWYAQZBI3ET6GTHX77QO/content
If I try to reference the site via the site relative URL method, the request fails if there is information beyond the "drive" part of the URL:
https://graph.microsoft.com:443/v1.0/sites/hostname.sharepoint.com:/sites/MySiteCollection:/lists/Documents/drive/items/017TIGYVRADE3TAWYAQZBI3ET6GTHX77QO/content
ServiceException: Code: BadRequest Message: Url specified is invalid. Inner error: AdditionalData: request-id: d897756c-f135-4ac2-85e3-454e8a8fd627 date: 2020-05-04T14:47:07 ClientRequestId: d897756c-f135-4ac2-85e3-454e8a8fd627
The query works fine until just after expressing the "Documents" list as a Drive.
This works: https://graph.microsoft.com:443/v1.0/sites/hostname.sharepoint.com:/sites/MySiteCollection:/lists/Documents/drive
This doesn't work: https://graph.microsoft.com:443/v1.0/sites/hostname.sharepoint.com:/sites/MySiteCollection:/lists/Documents/drive/
Why doesn't the server relative URL method of accessing a site work?