[GH-ISSUE #69] GraphGetUserTransitiveMemberOf is not paging aware #20

Closed
opened 2026-02-27 20:30:50 +03:00 by kerem · 1 comment
Owner

Originally created by @bieberium on GitHub (Feb 16, 2023).
Original GitHub issue: https://github.com/Set-OutlookSignatures/Set-OutlookSignatures/issues/69

Hi, thanks for your effort on this tool!

We are using your tool and came across an isse with the GraphOnly option: If a user has enough groups so that the API response is paged, only the initial batch is fetched. This can be fixed by adding a while loop like this into the function


$InvokeRestMethod = Invoke-RestMethod @requestBody
$x = $InvokeRestMethod.value

while ($null -ne $($InvokeRestMethod."@odata.nextLink")) {
$requestBody = @{
Method = 'Get'
Uri = $($InvokeRestMethod."@odata.nextLink")
Headers = $script:authorizationHeader
ContentType = 'Application/Json; charset=utf-8'
}
$InvokeRestMethod = Invoke-RestMethod @requestBody
#$x.count
$x += $InvokeRestMethod.value
}

`

Originally created by @bieberium on GitHub (Feb 16, 2023). Original GitHub issue: https://github.com/Set-OutlookSignatures/Set-OutlookSignatures/issues/69 Hi, thanks for your effort on this tool! We are using your tool and came across an isse with the GraphOnly option: If a user has enough groups so that the API response is paged, only the initial batch is fetched. This can be fixed by adding a while loop like this into the function ` ` ` $InvokeRestMethod = Invoke-RestMethod @requestBody` ` $x = $InvokeRestMethod.value` ` ` ` while ($null -ne $($InvokeRestMethod."@odata.nextLink")) {` ` $requestBody = @{` ` Method = 'Get' ` ` Uri = $($InvokeRestMethod."@odata.nextLink") ` ` Headers = $script:authorizationHeader ` ` ContentType = 'Application/Json; charset=utf-8' ` ` } ` ` $InvokeRestMethod = Invoke-RestMethod @requestBody ` ` #$x.count ` ` $x += $InvokeRestMethod.value ` ` } ` `
kerem closed this issue 2026-02-27 20:30:50 +03:00
Author
Owner

@GruberMarkus commented on GitHub (Feb 16, 2023):

Hi @bieberium,

thank you for bringing up this issue.

The problem has already been identified and solved. The solution will be part of release v4.0.0.

<!-- gh-comment-id:1433025151 --> @GruberMarkus commented on GitHub (Feb 16, 2023): Hi @bieberium, thank you for bringing up this issue. The problem has already been identified and solved. The solution will be part of release v4.0.0.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Set-OutlookSignatures-Set-OutlookSignatures#20
No description provided.