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/[email protected]/drive/root:/file.svc
And it fails with a 400 Bad request (all other requests succeed).
We have tried the following, without success:
- Escape the dot
.with%2E - I’ve seen that the
.svcextension was stripped, so doubled it, the file name becomesfile.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)