Set-OutlookSignatures / Set-OutlookSignatures

Set-OutlookSignatures. Email signatures and out-of-office replies for Exchange and all of Outlook: Classic and New, local and roaming, Windows, Web, Mac, Linux, Android, iOS
https://explicitconsulting.at/set-outlooksignatures
European Union Public License 1.2
321 stars 26 forks source link

GraphGetUserTransitiveMemberOf is not paging aware #69

Closed bieberium closed 1 year ago

bieberium commented 1 year ago

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 } `

`

GruberMarkus commented 1 year ago

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.