What SharePoint development model, framework, SDK or API is this about?
SharePoint REST API
Developer environment
Windows
What browser(s) / client(s) have you tested
[ ] 💥 Internet Explorer
[ ] 💥 Microsoft Edge
[ ] 💥 Google Chrome
[ ] 💥 FireFox
[ ] 💥 Safari
[ ] mobile (iOS/iPadOS)
[ ] mobile (Android)
[ ] not applicable
[x] other (enter in the "Additional environment details" area below)
Additional environment details
Developing with c#
sending httpClient requests using .net framework
Describe the bug / error
I have an application in azure/entra, it has been granted Sites.Selected (delegated) permissions.
The application has been added to the specified SharePoint Site Collection as full control using the /permissions end point (via the powershell command Grant-PnPAzureADAppSitePermission).
I am an Owner with full control rights on the Site Collection and it's sub sites.
Using the Sites.Selected role, I can get a token for both Graph v1 and for SharePoint v1/v2.
I can query and return items (Lists, ListItems, etc.) in the Site Collection root web with both Graph v1 and SharePoint v1/v2 using their respective tokens.
I can query and return items in the sub sites/webs with Graph v1 using the respective token.
I cannot query or return items from the sub sites with SharePoint v1/v2 using the respective token. The lists endpoint returns and empty array. Calling a list by title, produces an error saying the list doesn't exist.
These same queries worked with the Sites.Read.All permissions in the SharePoint v1/v2 api.
Steps to reproduce
Create and app in Entra/Azure
Grant delegated permissions for Sites.Selected and User.Read across the tenant in the Azure App.
Apply the desired permission for the Azure app in a SiteCollection that contains sub sites using the /permissions endpoint
Get a token for the Sites.Selected using the SharePoint v1/v2 method.
Using SharePoint v1/v2 Api, try to return the lists and list items from any of the sub sites.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
SharePoint REST API
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
Developing with c# sending httpClient requests using .net framework
Describe the bug / error
I have an application in azure/entra, it has been granted Sites.Selected (delegated) permissions. The application has been added to the specified SharePoint Site Collection as full control using the /permissions end point (via the powershell command Grant-PnPAzureADAppSitePermission). I am an Owner with full control rights on the Site Collection and it's sub sites.
Using the Sites.Selected role, I can get a token for both Graph v1 and for SharePoint v1/v2. I can query and return items (Lists, ListItems, etc.) in the Site Collection root web with both Graph v1 and SharePoint v1/v2 using their respective tokens. I can query and return items in the sub sites/webs with Graph v1 using the respective token. I cannot query or return items from the sub sites with SharePoint v1/v2 using the respective token. The lists endpoint returns and empty array. Calling a list by title, produces an error saying the list doesn't exist.
These same queries worked with the Sites.Read.All permissions in the SharePoint v1/v2 api.
Steps to reproduce
Expected behavior
The list / list items should return