We have to access several OneDrive files using Microsoft graph API. This works well until we met some file whose name ends with .svc
(they are regular files).
We have a request that looks like:
https://graph.microsoft.com/v1.0/users/account@xxx.onmicrosoft.com/drive/root:/file.svc
And it fails with a 400 Bad request
(all other requests succeed).
We have tried the following, without success:
.
with %2E
.svc
extension was stripped, so doubled it, the file name becomes file.svc.svc
How to encode a file name with a .svc
extension so graph API accepts it? (There is a way for sure, since we managed to upload such a file)
To access file content itself, the URI had to be https://graph.microsoft.com/v1.0/users/account@xxx.onmicrosoft.com/drive/root:/file.svc:/content
(the :/content
at the end does the trick, because it is semantically correct).