microsoftgraph / microsoftgraph/msgraph-sdk-java
No way to list `Sites.Selected` collection available for application
Offen
@Ndiritu arbeitet bereits daran.
Seit 12.8.2024.
Status: Needs Investigation
type:question
- Vorherrschende Sprache
- Java
- Sterne
- 444
- Forks
- 154
- Ø Merge
- 18 Std. 28 Min.
- Gemergte PRs (30 T.)
- 4
Beschreibung
Describe the bug
When an app has Sites.Read.All api permission, it can list all available sites.
But when it has Sites.Selected only and was granted permissions to selected sites
via POST /v1.0/sites/{siteId}/permissions
{
"roles": [
"read"
],
"grantedToIdentities": [
{
"application": {
"id": "{clientId}",
"displayName": "Name"
}
}
]
}
There is no way to list these site available to the application:
client.sites().get().getValue();
results 0
client.sites().get(requestConfiguration -> {
requestConfiguration.queryParameters.select = new String[]{"siteCollection", "webUrl"};
requestConfiguration.queryParameters.filter = "siteCollection/root ne null";
}).getValue()
results: Access denied
client.sites().getAllSites().get().getValue();
results: Access denied
Expected behavior
Some api call which returns available via Sites.Selected
How to reproduce
- Set
Sites.Selectedpermissions to application - Add site permission to the selected collection
POST /v1.0/sites/{siteId}/permissions
{
"roles": [
"read"
],
"grantedToIdentities": [
{
"application": {
"id": "{clientId}",
"displayName": "Name"
}
}
]
}
- Call
client.sites().getAllSites().get().getValue();
observe empty result collection
SDK Version
6.10.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.