What SharePoint development model, framework, SDK or API is this about?
SharePoint REST API
Developer environment
None
What browser(s) / client(s) have you tested
[ ] š„ Internet Explorer
[ ] š„ Microsoft Edge
[ ] š„ Google Chrome
[ ] š„ FireFox
[ ] š„ Safari
[ ] mobile (iOS/iPadOS)
[ ] mobile (Android)
[X] not applicable
[ ] other (enter in the "Additional environment details" area below)
Additional environment details
No response
Describe the bug / error
Using the graph explorer, I logged into it as myself and tried to do a POST request to https://graph.microsoft.com/beta/sites/the-id-of-my-sharepoint-site/pages with a body of:
{
"name": "pets/Dog/index.aspx",
"title": "All about dogs",
"pageLayout": "article",
"@odata.type": "#microsoft.graph.sitePage"
}
Last week, when done against a site where I had the creation of subfolders enabled, doing this automatically created 2 subfolders in my site if they didn't yet exist: "pets" and, within it, "Dog". It then created a Site Page whose name was index.aspx and whose webUrl was SitePages/pets/Dog/index.aspx. Since there is no dedicated Graph API endpoint for creating a subfolder in a site, this was the only way to build out a folder hierarchy by API (rather than manually, clicking around in Sharepoint Pages in a web browser).
Today, this started 404-ing out when I tried to create one by the name of pets/Cat/index.aspx. I could still create, say, pets/testing123.aspx, because the "pets" folder already existed, but putting the name of a folder that did not yet exist into the name property started 404-ing out this week after auto-creating the folder last week.
I deleted the entire "pets" folder and my code from last week, with pets/Dog/index.aspx also started 404-erroring out as well with a response body like this:
Make sure your site pages doesn't yet have a "pets" subfolder
Open the graph explorer and try to do a POST request to https://graph.microsoft.com/beta/sites/the-id-of-your-sharepoint-site/pages with a body of:
{
"name": "pets/Dog/index.aspx",
"title": "All about dogs",
"pageLayout": "article",
"@odata.type": "#microsoft.graph.sitePage"
}
Confirm you get a 404 error.
Manually go to your Sharepoint site pages file list (https://your-org.sharepoint.com/teams/Your-Site-Name/SitePages/Forms/ByAuthor.aspx), create a new folder in it called pets, and one within that called Dog, and then try again.
Confirm you get a 201 response with a response body showing you a page ID, a name of index.aspx, and a webUrl of SitePages/pets/Dog/index.aspx. (This demonstrates that the API still has some idea how to handle the idea of subfoldering via the page-creation name property -- it's just the auto-creation of folders that suddenly broke this week.)
Expected behavior
I expected to get the 201 response I received in steps 5-6 during steps 3-4 instead, like I did last week (when the API auto-created "pets" and "Dog" subfolders on my behalf).
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
SharePoint REST API
Developer environment
None
What browser(s) / client(s) have you tested
Additional environment details
No response
Describe the bug / error
Using the graph explorer, I logged into it as myself and tried to do a POST request to
https://graph.microsoft.com/beta/sites/the-id-of-my-sharepoint-site/pages
with a body of:Last week, when done against a site where I had the creation of subfolders enabled, doing this automatically created 2 subfolders in my site if they didn't yet exist: "pets" and, within it, "Dog". It then created a Site Page whose
name
wasindex.aspx
and whosewebUrl
wasSitePages/pets/Dog/index.aspx
. Since there is no dedicated Graph API endpoint for creating a subfolder in a site, this was the only way to build out a folder hierarchy by API (rather than manually, clicking around in Sharepoint Pages in a web browser).Today, this started 404-ing out when I tried to create one by the name of
pets/Cat/index.aspx
. I could still create, say,pets/testing123.aspx
, because the "pets" folder already existed, but putting the name of a folder that did not yet exist into thename
property started 404-ing out this week after auto-creating the folder last week.I deleted the entire "pets" folder and my code from last week, with
pets/Dog/index.aspx
also started 404-erroring out as well with a response body like this:Can Microsoft please urgently either:
We have an application that is now completely broken because of this week's failure.
Thank you!
Steps to reproduce
https://graph.microsoft.com/beta/sites/the-id-of-your-sharepoint-site/pages
with a body of:https://your-org.sharepoint.com/teams/Your-Site-Name/SitePages/Forms/ByAuthor.aspx
), create a new folder in it calledpets
, and one within that calledDog
, and then try again.name
ofindex.aspx
, and awebUrl
ofSitePages/pets/Dog/index.aspx
. (This demonstrates that the API still has some idea how to handle the idea of subfoldering via the page-creationname
property -- it's just the auto-creation of folders that suddenly broke this week.)Expected behavior
I expected to get the 201 response I received in steps 5-6 during steps 3-4 instead, like I did last week (when the API auto-created "
pets
" and "Dog
" subfolders on my behalf).