microsoftgraph / microsoftgraph/msgraph-sdk-java
No way to list `Sites.Selected` collection available for application
Abierto
@Ndiritu ya está trabajando en esto.
Desde el 12/8/2024.
Status: Needs Investigation
type:question
- Lenguaje dominante
- Java
- Estrellas
- 444
- Forks
- 154
- Merge medio
- 18 h 28 min
- PR fusionados (30 d)
- 4
Descripción
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_
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Evaluación
Este issue todavía no se ha evaluado.