Repository: Azure/azqr

Issue:
Graph queries are not paging when number of results is higher than 1000
## Expected Behavior

Graph queries should return all results

## Actual Behavior

Graph queries are not paging when number of results is higher than 1000


Hints from issue comments:

Solution patch:
diff --git a/go.mod b/go.mod
index b771412..846c119 100644
--- a/go.mod
+++ b/go.mod
@@ -15,7 +15,7 @@ require (
 	github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2 v2.3.0
 	github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/carbonoptimization/armcarbonoptimization v1.0.0
 	github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn v1.1.1
-	github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices v1.8.0
+	github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/v2 v2.0.0
 	github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1
 	github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance v1.0.0
 	github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry v1.3.0-beta.3
diff --git a/go.sum b/go.sum
index 4f76832..bd199b3 100644
--- a/go.sum
+++ b/go.sum
@@ -22,8 +22,8 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/carbonoptimization/armcarb
 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/carbonoptimization/armcarbonoptimization v1.0.0/go.mod h1:RKeTr4xYL46aSsglK/ejFymF4/TM4iN0V8gKscCpcT0=
 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn v1.1.1 h1:CtE6GCP9YEDF6DjpFxl7xQBqklqfyCC/xkBKUGa/IAc=
 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cdn/armcdn v1.1.1/go.mod h1:b9yk+8vyxSsBsiEjk9kzrwxgyn+7+J4HzDOYUPznES4=
-github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices v1.8.0 h1:ZMGAqCZov8+7iFUPWKVcTaLgNXUeTlz20sIuWkQWNfg=
-github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices v1.8.0/go.mod h1:BElPQ/GZtrdQ2i5uDZw3OKLE1we75W0AEWyeBR1TWQA=
+github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/v2 v2.0.0 h1:pxphC/uRZKNHNPbZ0duDDgKkefju2F03OkG5xF6byHQ=
+github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/v2 v2.0.0/go.mod h1:twcwRey+l1znKBL5TEzYiZMtiVkWfM7Pq8a9vY04xYc=
 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1 h1:UPeCRD+XY7QlaGQte2EVI2iOcWvUYA2XY8w5T/8v0NQ=
 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1/go.mod h1:oGV6NlB0cvi1ZbYRR2UN44QHxWFyGk+iylgD0qaMXjA=
 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerinstance/armcontainerinstance v1.0.0 h1:yKmuPI8w+5rXTMa4G5xrzwz9aGEkS6t4Gx/cRBnuh+M=
diff --git a/internal/graph/graph.go b/internal/graph/graph.go
index 0e7f91e..476c246 100644
--- a/internal/graph/graph.go
+++ b/internal/graph/graph.go
@@ -37,7 +37,7 @@ type GraphResult struct {
 type QueryRequestOptions struct {
 	ResultFormat             string  `json:"resultFormat,omitempty"`             // Format of the result
 	Top                      *int32  `json:"top,omitempty"`                      // Max number of results
-	SkipToken                *string `json:"skipToken,omitempty"`                // Token for pagination
+	SkipToken                *string `json:"$skipToken,omitempty"`                // Token for pagination
 	AuthorizationScopeFilter *string `json:"authorizationScopeFilter,omitempty"` // Filter by authorization scope
 }
 
@@ -51,7 +51,7 @@ type QueryRequest struct {
 // QueryResponse represents the response from the Resource Graph API.
 type QueryResponse struct {
 	Data       []interface{} `json:"data"` // Query result data
-	SkipToken  *string       `json:"skipToken,omitempty"`
+	SkipToken  *string       `json:"$skipToken,omitempty"`
 	Quota      int           // Value of x-ms-user-quota-remaining header as int
 	RetryAfter time.Duration // Value of x-ms-user-quota-resets-after header as timespan
 }
diff --git a/internal/scanners/aif/aif.go b/internal/scanners/aif/aif.go
index 1092def..c6fc99d 100644
--- a/internal/scanners/aif/aif.go
+++ b/internal/scanners/aif/aif.go
@@ -6,7 +6,7 @@ package aif
 import (
 	"github.com/Azure/azqr/internal/models"
 	"github.com/Azure/azqr/internal/throttling"
-	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
+	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/v2"
 )
 
 func init() {
diff --git a/internal/scanners/aif/rules.go b/internal/scanners/aif/rules.go
index 9548bb9..a03f80e 100644
--- a/internal/scanners/aif/rules.go
+++ b/internal/scanners/aif/rules.go
@@ -7,7 +7,7 @@ import (
 	"strings"
 
 	"github.com/Azure/azqr/internal/models"
-	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
+	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/v2"
 )
 
 // GetRecommendations - Returns the rules for the AIFoundryScanner
diff --git a/internal/scanners/plugins/openai/throttling.go b/internal/scanners/plugins/openai/throttling.go
index f08988d..e924caa 100644
--- a/internal/scanners/plugins/openai/throttling.go
+++ b/internal/scanners/plugins/openai/throttling.go
@@ -16,7 +16,7 @@ import (
 	"github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
 	"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
 	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
-	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
+	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/v2"
 	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor"
 )
 



Test patch:
diff --git a/internal/scanners/aif/rules_test.go b/internal/scanners/aif/rules_test.go
index 15c6fff..fef2c28 100644
--- a/internal/scanners/aif/rules_test.go
+++ b/internal/scanners/aif/rules_test.go
@@ -9,7 +9,7 @@ import (
 
 	"github.com/Azure/azqr/internal/models"
 	"github.com/Azure/azqr/internal/to"
-	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices"
+	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cognitiveservices/armcognitiveservices/v2"
 )
 
 func TestAIFoundryScanner_Rules(t *testing.T) {