Description
Category
- Question
- Documentation issue
- Bug
Expected or Desired Behavior
I'm building an SPA application that connects to the graph to get data.
Per user configuration is stored in a file put inside special approot folder.
I save the user preferences using PUT https://graph.microsoft.com/v1.0/me/drive/special/approot:/preferences.json:/content
and I get back the saved preferences using the same url with GET
verb.
If my application's display name is MyCorp - super app
, everything is working well.
If my application's display name is MyCorp : super app
, the request crash.
I guess the api will try to create the app folder without encoding forbidden characters. It should encode, or replace such characters to create valid file name.
Observed Behavior
When the application contains a :
in its name, the query crash with:
HTTP/1.1 400 Bad Request
{
"error": {
"code": "invalidRequest",
"message": "Invalid request",
"innerError": {
"date": "2023-07-10T15:10:06",
"request-id": "564f4a41-0ba0-447d-9dcf-2a70e8319710",
"client-request-id": "564f4a41-0ba0-447d-9dcf-2a70e8319710"
}
}
}
If I rename the application without the :
, then log out and log in again (some cache is involved somewhere), I get either the body of the file (http 200) or not found error (404) if the user never saved its prefs.
Steps to Reproduce
Create an application registration which contains ":".
Grant Sites.ReadWrite.All
permission
Try to write a file inside special approot folder by emitting a PUT https://graph.microsoft.com/v1.0/me/drive/special/approot:/preferences.json:/content
with {}
body.
The response will be 400.
Thank you.
[ ]: http://aka.ms/onedrive-api-issues
[x]: http://aka.ms/onedrive-api-issues