How to read all entitlements through REST API call from PowerShell Script (with pagination)

I posted a solution in the other topic you created yesterday on this exact same question.