Conditional access, compliance, intent, app management policies list api do not support pagination

Abierto
#1,164 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
csharp
Área
api

Línea de trabajo

Start by reproducing the report: call https://graph.microsoft.com/beta/identity/conditionalAccess/policies?$count=true&$top=100 and check whether ODataNextLink is absent — this strongly suggests a service-side behavior rather than an SDK defect, so confirm where the next-link is produced (service response vs. the .NET page extraction in the request adapter) before writing code. Inspect the generated request builder for identity/conditionalAccess/policies and the Kiota-generated page collection classes to see if any client-side trimming drops the link. Done means a clear verdict on whether the fix belongs in this repository, with an issue response or a minimal repro attached either way.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

status:waiting-for-triage type:bug
Describe the bug

According to docs https://learn.microsoft.com/en-us/graph/api/conditionalaccessroot-list-policies?view=graph-rest-beta&tabs=http, this api support pagination via top / skip.

But we faced an issue: we have 164 conditional access policies, we call api with $top=100 parameter, and ODataNextLink is missing in the response. Response contained exactly 100 policies. So we cannot load all policies if specify any top parameter.

Api returns all policies only if we remove the $top completelly. But in this variant we cannot control page and request size, and cannot be sure that all policies are loaded.

Image
Expected behavior

If we provide some $top parameter, which is less then total policies amount, the response should contain ODataNextLink

How to reproduce

Call https://graph.microsoft.com/beta/identity/conditionalAccess/policies?$count=true&$top=100 or with any top which is less then total policies amount in your environment.
See that ODataNextLink is missing.

SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

Load conditional access policies without any top parameter.
Currently it returns all 164 policies on one page.
But this solution is 'uncontrolled'

Debug output
Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_
Lenguaje dominante
C#
Estrellas
114
Forks
36
Merge medio
13 h 37 min
PR fusionados (30 d)
4

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoftgraph/msgraph-beta-sdk-dotnet

Todos los issues de microsoftgraph/msgraph-beta-sdk-dotnet

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.