Skip to content

Bug / enhancment - graph.list_groups() do not support pagination #889

@vytautas9

Description

@vytautas9

Describe the bug
Using a current version of graph module and particularly graph.list_groups() function is not feasible as the function does not support pagination and returns only top 100 groups.

To Reproduce
Execute:

with labs.service_principal_authentication(
    key_vault_uri=keyvault_url, 
    key_vault_tenant_id=tenant_id_secret_name,
    key_vault_client_id=client_id_secret_name,
    key_vault_client_secret=client_secret_secret_name):

    groups = graph.list_groups()

and check the number of groups:

len(groups)

the output will be 100 (if a tenant has >100 groups).

Expected behavior
graph module functions performs pagination on the back-end OR gives a user opportunity to perform cursor pagination (where applicable). This should apply to other graph module functions as well.

  • Semantic link labs version: 0.12.3

Additional context
Will provide a PR with automatic pagination implementation as a proposed fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions