microsoftgraph / microsoftgraph/msgraph-sdk-java
No way to list `Sites.Selected` collection available for application
Aperta
@Ndiritu ci sta già lavorando.
Dal 12/8/2024.
Status: Needs Investigation
type:question
- Lingua principale
- Java
- Stelle
- 444
- Fork
- 154
- Merge medio
- 18h 28m
- PR unite (30g)
- 4
Descrizione
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_
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.